Class contains Gems specific adaptations to parent class.

package Gems
subpackage Default
copyright Copyright (c) 2014 Erasmus MC
license New BSD License
since Class available since version 1.6.5 30-nov-2014 17:50:22
inherited_from \Gems_Controller_ModelSnippetActionAbstract

 Methods

The automatically filtered result

autofilterAction($resetMvc = true
Inherited

Parameters

$resetMvc

When true only the filtered resulsts

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

A ModelAbstract->setOnLoad() function that takes care of transforming a dateformat read from the database to a \Zend_Date format

emptyCount(mixed $value, boolean $isNew = false, string $name = null, array $context = array(), boolean $isPost = false) : \MUtil_Date | \Zend_Db_Expr | string

If empty or \Zend_Db_Expression (after save) it will return just the value currently there are no checks for a valid date format.

see

Parameters

$value

mixed

The value being saved

$isNew

boolean

True when a new item is being saved

$name

string

The name of the current field

$context

array

Optional, the other values being saved

$isPost

boolean

True when passing on post data

Returns

\MUtil_Date\Zend_Db_Exprstring

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

A ModelAbstract->setOnLoad() function that takes care of transforming a dateformat read from the database to a \Zend_Date format

fillCount(mixed $value, boolean $isNew = false, string $name = null, array $context = array(), boolean $isPost = false) : \MUtil_Date | \Zend_Db_Expr | string

If empty or \Zend_Db_Expression (after save) it will return just the value currently there are no checks for a valid date format.

see

Parameters

$value

mixed

The value being saved

$isNew

boolean

True when a new item is being saved

$name

string

The name of the current field

$context

array

Optional, the other values being saved

$isPost

boolean

True when passing on post data

Returns

\MUtil_Date\Zend_Db_Exprstring

Get the browse columns

getBrowseColumns() : array

Returns

array

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 for showing a reactivate item page with extra titles

reactivateAction() 
Inherited

Action for showing an item page with title

showAction() 
Inherited

A ModelAbstract->setOnLoad() function that takes care of transforming a dateformat read from the database to a \Zend_Date format

valueCount(mixed $value, boolean $isNew = false, string $name = null, array $context = array(), boolean $isPost = false) : \MUtil_Date | \Zend_Db_Expr | string

If empty or \Zend_Db_Expression (after save) it will return just the value currently there are no checks for a valid date format.

see

Parameters

$value

mixed

The value being saved

$isNew

boolean

True when a new item is being saved

$name

string

The name of the current field

$context

array

Optional, the other values being saved

$isPost

boolean

True when passing on post data

Returns

\MUtil_Date\Zend_Db_Exprstring

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

 Properties

 

$currentUser

$currentUser : \Gems_User_User

Default

 

$db

$db : \Zend_Db_Adapter_Abstract

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

 

$util

$util : \Gems_Util

Default

 

The parameters used for the autofilter action.

$autofilterParameters : array

Default

array('browse' => false, 'columns' => 'getBrowseColumns')

When the value is a function name of that object, then that functions is executed with the array key as single parameter and the return value is set as the used value

  • unless the key is an integer in which case the code is executed but the return value is not stored.
 

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'
 

$engine

$engine : \Gems_Tracker_Engine_TrackEngineInterface

Default

 

$exportFormSnippets

$exportFormSnippets 

Default

'Export\\ExportFormSnippet'
 

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

$indexStartSnippets : mixed

Default

array('Generic\\ContentTitleSnippet', 'Tracker_Fields_FieldReportSearchSnippet')
inherited_from \Gems_Controller_ModelSnippetActionAbstract::indexStartSnippets
 

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'
 

Where statement filtering out organisations

$orgWhere : string

Default

 

The snippets used for the show action

$showSnippets : mixed

Default

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

The number of instances of the currently selected track id

$trackCount : integer

Default

 

The number of instances of the current field that have been filled

$trackFilled : integer

Default

 

The currently selected track id

$trackId : integer

Default

 

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