Controller for Source maintenance

package Gems
subpackage Default
copyright Copyright (c) 2011 Erasmus MC
license New BSD License
since Class available since version 1.4
inherited_from \Gems_Controller_ModelSnippetActionAbstract

 Methods

Check token attributes for a single source

attributesAction() 

Check all token attributes for all sources

attributesAllAction() 

The automatically filtered result

autofilterAction($resetMvc = true
Inherited

Parameters

$resetMvc

When true only the filtered resulsts

Check all the tokens for a single source

checkAction() 

Check all the tokens for all sources

checkAllAction() 

Action for showing a create new item page with extra title

createAction() 
Inherited

Creates a model for getModel(). Called only for each new $action.

createModel(boolean $detailed, string $action) : \MUtil_Model_ModelAbstract

The parameters allow you to easily adapt the model to the current action. The $detailed parameter was added, because the most common use of action is a split between detailed and summarized actions.

Parameters

$detailed

boolean

True when the current action is not in $summarizedActions.

$action

string

The current action.

Returns

\MUtil_Model_ModelAbstract

Action for showing a deactivate item page with extra titles

deactivateAction() 
Inherited

Action for showing a delete item page with extra titles

deleteAction() 
Inherited

Action for showing a edit item page with extra title

editAction() 
Inherited

Outputs the model to excel, applying all filters and searches needed

excelAction() 
Inherited

When you want to change the output, there are two places to check:

  1. $this->addExcelColumns($model), where the model can be changed to have labels for columns you need exported

  2. $this->getExcelData($data, $model) where the supplied data and model are merged to get output (by default all fields from the model that have a label)

Export model data

exportAction() 
Inherited

Helper function to get the title for the create action.

getCreateTitle() : \$string
Inherited

Returns

\$string

Helper function to get the question for the deactivate action.

getDeactivateQuestion() : \$string
Inherited

Returns

\$string

Helper function to get the title for the deactivate action.

getDeactivateTitle() : \$string
Inherited

Returns

\$string

Name of the default import translator

getDefaultImportTranslator() : string
Inherited

Returns

string

Helper function to get the question for the delete action.

getDeleteQuestion() : \$string
Inherited

Returns

\$string

Helper function to get the title for the delete action.

getDeleteTitle() : \$string
Inherited

Returns

\$string

Helper function to get the title for the edit action.

getEditTitle() : \$string
Inherited

Returns

\$string

The directory to use for temporary storage

getImportTempDirectory() : string
Inherited

Returns

string

Get the possible translators for the import snippet.

getImportTranslators() : array
Inherited

Returns

arrayof \MUtil_Model_ModelTranslatorInterface objects

Get an Importer object for this actions

getImporter() : \MUtil_Model_Importer
Inherited

Returns

\MUtil_Model_Importer

Helper function to get the title for the index action.

getIndexTitle() : \$string
inherited_from \Gems_Controller_ModelSnippetActionAbstract::getIndexTitle()

Returns

\$string

Helper function to get the title for the index action.

getIndexTitle() : \$string
Inherited

Returns

\$string

Return the current request ID, if any.

getInstanceId() : mixed
Inherited

Overrule this function if the last item in the page title should be something other than te value of \MUtil_Model::REQUEST_ID.

Returns

mixed

Returns the on empty texts for the autofilter snippets

getOnEmptyText() : string
Inherited

Returns

string

Helper function to get the question for the reactivate action.

getReactivateQuestion() : \$string
Inherited

Returns

\$string

Helper function to get the title for the reactivate action.

getReactivateTitle() : \$string
Inherited

Returns

\$string

Helper function to get the title for the show action.

getShowTitle() : \$string
Inherited

Returns

\$string

Returns the current html/head/title for this page.

getTitle(string $separator = null) : string
Inherited

If the title is an array the seperator concatenates the parts.

Parameters

$separator

string

Returns

string

Helper function to allow generalized statements about the items in the model.

getTopic(integer $count = 1) : \$string
inherited_from \Gems_Controller_ModelSnippetActionAbstract::getTopic()

Parameters

$count

integer

Returns

\$string

Helper function to allow generalized statements about the items in the model.

getTopic(integer $count = 1) : \$string
Inherited

Parameters

$count

integer

Returns

\$string

Get a callable for the gettopic function

getTopicCallable() : callable
Inherited

Returns

callable

Generic model based import action

importAction() 
Inherited

Action for showing a browse page

indexAction() 
Inherited

Intializes the html component.

initHtml(boolean $reset = false) : void
Inherited

Parameters

$reset

boolean

Throws away any existing html output when true

Action to check whether the source is active

pingAction() 

Action for showing a reactivate item page with extra titles

reactivateAction() 
Inherited

Action for showing an item page with title

showAction() 
Inherited

Synchronize survey status for the surveys in a source

synchronizeAction() 

Synchronize survey status for the surveys in all sources

synchronizeAllAction() 

Displays a textual explanation what synchronization does on the page.

addSynchronizationInformation() 

Finds the first item with one of the actions specified as parameter and using the current controller

firstAllowedMenuItem(string $action, string $action2 = null) : \Gems_Menu_SubMenuItem
Inherited

Parameters

$action

string

$action2

string

Returns

\Gems_Menu_SubMenuItem

Returns an array with all columns from the model that have a label

getExcelData(array $data, \MUtil_Model_ModelAbstract $model) : array
Inherited

Parameters

$data

array

$model

\MUtil_Model_ModelAbstract

Returns

array

Get the model for export and have the option to change it before using for export

getExportModel() : 
Inherited

Returns

Stub for overruling default snippet loader initiation.

loadSnippetLoader() 
Inherited

Load a source object

getSourceById(integer $sourceId = null) : \Gems_Tracker_Source_SourceInterface

Parameters

$sourceId

integer

Returns

\Gems_Tracker_Source_SourceInterface

The id of the current source

getSourceId() : integer

Returns

integer

 Properties

 

$accesslog

$accesslog : \Gems_AccessLog

Default

 

$currentUser

$currentUser : \Gems_User_User

Default

 

$escort

$escort : \GemsEscort

Default

 

Should Excel output contain formatted data (date fields, select lists)

$formatExcelData : boolean

Default

true
 

$loader

$loader : \Gems_Loader

Default

 

$menu

$menu : \Gems_Menu

Default

 

Array of the actions that use a summarized version of the model.

$summarizedActions : array

Default

array('index', 'autofilter', 'check-all', 'attributes-all', 'synchronize-all')

This determines the value of $detailed in createAction(). As it is usually less of a problem to use a $detailed model with an action that should use a summarized model and I guess there will usually be more detailed actions than summarized ones it seems less work to specify these.

 

$util

$util : \Gems_Util

Default

 

The snippets used for the autofilter action.

$autofilterParameters : mixed

Default

array('extraSort' => array('gso_source_name' => SORT_ASC))
 

The snippets used for the autofilter action.

$autofilterSnippets : mixed

Default

'ModelTableSnippetGeneric'
 

The snippets used for the create and edit actions.

$createEditSnippets : mixed

Default

'ModelFormSnippetGeneric'
 

The snippets used for the delete action.

$deleteSnippets : mixed

Default

'ModelItemYesNoDeleteSnippetGeneric'
 

$exportFormSnippets

$exportFormSnippets 

Default

'Export\\ExportFormSnippet'
 

The snippets used for the index action, before those in autofilter

$indexStartSnippets : mixed

Default

array('Generic\\ContentTitleSnippet', 'AutosearchFormSnippet')
 

The snippets used for the index action, after those in autofilter

$indexStopSnippets : mixed

Default

'Generic\\CurrentSiblingsButtonRowSnippet'
 

The snippets used for the show action

$showSnippets : mixed

Default

array('Generic\\ContentTitleSnippet', 'ModelItemTableSnippetGeneric')
 

Gems only parameters used for the autofilter action. Can be overruled by setting $this->autofilterParameters

$_autofilterExtraParameters : array

Default

array('browse' => true, 'containingId' => 'autofilter_target', 'keyboard' => true, 'onEmpty' => 'getOnEmptyText', 'sortParamAsc' => 'asrt', 'sortParamDesc' => 'dsrt')
 

Gems only parameters used for the create action. Can be overruled by setting $this->createParameters or $this->createEditParameters

$_createExtraParameters : array

Default

array('formTitle' => 'getCreateTitle', 'topicCallable' => 'getTopicCallable')
 

Gems only parameters used for the deactivate action. Can be overruled by setting $this->deactivateParameters

$_deactivateExtraParameters : array

Default

array('confirmQuestion' => 'getDeactivateQuestion', 'displayTitle' => 'getDeactivateTitle', 'formTitle' => 'getDeactivateTitle', 'topicCallable' => 'getTopicCallable')
 

Gems only parameters used for the delete action. Can be overruled by setting $this->deleteParameters

$_deleteExtraParameters : array

Default

array('deleteQuestion' => 'getDeleteQuestion', 'displayTitle' => 'getDeleteTitle', 'formTitle' => 'getDeleteTitle', 'topicCallable' => 'getTopicCallable')
 

Gems only parameters used for the edit action. Can be overruled by setting $this->editParameters or $this->createEditParameters

$_editExtraParameters : array

Default

array('formTitle' => 'getEditTitle', 'topicCallable' => 'getTopicCallable')
 

Gems only parameters used for the import action. Can be overruled by setting $this->inmportParameters

$_importExtraParameters : array

Default

array('formatBoxClass' => 'browser table', 'importer' => 'getImporter', 'tempDirectory' => 'getImportTempDirectory', 'topicCallable' => 'getTopic')
 

Gems only parameters used for the deactivate action. Can be overruled by setting $this->deactivateParameters

$_reactivateExtraParameters : array

Default

array('confirmQuestion' => 'getReactivateQuestion', 'displayTitle' => 'getReactivateTitle', 'formTitle' => 'getReactivateTitle', 'topicCallable' => 'getTopicCallable')