Class contains Gems specific adaptations to parent class.

package Gems
subpackage Controller
copyright Copyright (c) 2011 Erasmus MC
license New BSD License
since Class available since version 1.4.2

 Methods

The automatically filtered result

autofilterAction($resetMvc = true

Parameters

$resetMvc

When true only the filtered resulsts

Action for showing a create new item page with extra title

createAction() 

Action for showing a deactivate item page with extra titles

deactivateAction() 

Action for showing a delete item page with extra titles

deleteAction() 

Action for showing a edit item page with extra title

editAction() 

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

excelAction() 

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() 

Helper function to get the title for the create action.

getCreateTitle() : \$string

Returns

\$string

Helper function to get the question for the deactivate action.

getDeactivateQuestion() : \$string

Returns

\$string

Helper function to get the title for the deactivate action.

getDeactivateTitle() : \$string

Returns

\$string

Name of the default import translator

getDefaultImportTranslator() : string

Returns

string

Helper function to get the question for the delete action.

getDeleteQuestion() : \$string

Returns

\$string

Helper function to get the title for the delete action.

getDeleteTitle() : \$string

Returns

\$string

Helper function to get the title for the edit action.

getEditTitle() : \$string

Returns

\$string

The directory to use for temporary storage

getImportTempDirectory() : string

Returns

string

Get the possible translators for the import snippet.

getImportTranslators() : array

Returns

arrayof \MUtil_Model_ModelTranslatorInterface objects

Get an Importer object for this actions

getImporter() : \MUtil_Model_Importer

Returns

\MUtil_Model_Importer

Helper function to get the title for the index action.

getIndexTitle() : \$string

Returns

\$string

Return the current request ID, if any.

getInstanceId() : mixed

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

Returns

string

Helper function to get the question for the reactivate action.

getReactivateQuestion() : \$string

Returns

\$string

Helper function to get the title for the reactivate action.

getReactivateTitle() : \$string

Returns

\$string

Helper function to get the title for the show action.

getShowTitle() : \$string

Returns

\$string

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

getTitle(string $separator = null) : string

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

Parameters

$count

integer

Returns

\$string

Get a callable for the gettopic function

getTopicCallable() : callable

Returns

callable

Generic model based import action

importAction() 

Action for showing a browse page

indexAction() 

Intializes the html component.

initHtml(boolean $reset = false) : void

Parameters

$reset

boolean

Throws away any existing html output when true

Action for showing a reactivate item page with extra titles

reactivateAction() 

Action for showing an item page with title

showAction() 

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

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

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() : 

Returns

Stub for overruling default snippet loader initiation.

loadSnippetLoader() 

 Properties

 

$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

 

$util

$util : \Gems_Util

Default

 

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')