Displays each fields of a single item in a model in a row in a Html table the model set through the $model snippet parameter.

If you want to use this class "as is" use the 'Generic_ModelItemTableSnippet' snippet.

This class is not in the standard snippet loading directories and does not follow their naming conventions, but exists only to make it simple to extend this class for a specific implementation.

package Gems
subpackage Snippets\Agenda
copyright Copyright (c) 2015 Erasmus MC
license New BSD License
since Class available since version 1.6.5 13-mrt-2015 11:11:12
inherited_from \Gems_Snippets_ModelItemTableSnippetGeneric

 Methods

Create the snippets content

getHtmlOutput(\Zend_View_Abstract $view) : \MUtil_Html_HtmlInterface
Inherited

This is a stub function either override getHtmlOutput() or override render()

Parameters

$view

\Zend_View_Abstract

Just in case it is needed here

Returns

\MUtil_Html_HtmlInterfaceSomething that can be rendered

When hasHtmlOutput() is false a snippet user should check for a redirectRoute.

getRedirectRoute() : mixed

When hasHtmlOutput() is true this functions should not be called.

see

Returns

mixedNothing or either an array or a string that is acceptable for Redector->gotoRoute()

The place to check if the data set in the snippet is valid to generate the snippet.

hasHtmlOutput() : boolean

When invalid data should result in an error, you can throw it here but you can also perform the check in the checkRegistryRequestsAnswers() function from the \MUtil_Registry_TargetInterface.

Returns

boolean

Adds rows from the model to the bridge that creates the browse table.

addShowTableRows(\MUtil_Model_Bridge_VerticalTableBridge $bridge, \MUtil_Model_ModelAbstract $model) : void
Inherited

Overrule this function to add different columns to the browse table, without having to recode the core table building code.

Parameters

$bridge

\MUtil_Model_Bridge_VerticalTableBridge

$model

\MUtil_Model_ModelAbstract

Creates the model

createModel() : \MUtil_Model_ModelAbstract
Inherited

Returns

\MUtil_Model_ModelAbstract

Finds a specific active menu item

findMenuItem(string $controller, string $action = 'index') : \Gems_Menu_SubMenuItem
Inherited

Parameters

$controller

string

$action

string

Returns

\Gems_Menu_SubMenuItem

Returns an edit menu item, if access is allowed by privileges

getEditMenuItem() : \Gems_Menu_SubMenuItem
Inherited

Returns

\Gems_Menu_SubMenuItem

An optional title for the head of the page.

getTitle() : string
Inherited

Returns

string

Get the appointment where for this snippet

getWhere() : string

Returns

string

Overrule this function if you want to perform a different action than deleting when the user choose 'yes'.

performAction() 

Set what to do when the form is 'finished'.

setAfterCleanupRoute() 

Set the footer of the browse table.

setShowTableFooter(\MUtil_Model_Bridge_VerticalTableBridge $bridge, \MUtil_Model_ModelAbstract $model) : void

Overrule this function to set the header differently, without having to recode the core table building code.

Parameters

$bridge

\MUtil_Model_Bridge_VerticalTableBridge

$model

\MUtil_Model_ModelAbstract

Set the footer of the browse table.

setShowTableFooter(\MUtil_Model_Bridge_VerticalTableBridge $bridge, \MUtil_Model_ModelAbstract $model) : void
Inherited

Overrule this function to set the header differently, without having to recode the core table building code.

Parameters

$bridge

\MUtil_Model_Bridge_VerticalTableBridge

$model

\MUtil_Model_ModelAbstract

 Properties

 

The action to go to when the user clicks 'No'.

$abortAction : string

Default

'show'

If you want to change to another controller you'll have to code it.

 

Edit the item when it is clicked (provided the user has the right)

$addOnclickEdit : boolean

Default

true
 

Nothing or either an array or a string that is acceptable for Redector->gotoRoute()

$afterSaveRouteUrl : mixed

Default

see
 

One of the \MUtil_Model_Bridge_BridgeAbstract MODE constants

$bridgeMode : integer

Default

\MUtil_Model_Bridge_BridgeAbstract::MODE_SINGLE_ROW
 

$cache

$cache : \Zend_Cache_Core

Default

 

Shortfix to add class attribute

$class : string

Default

'displayer'
 

Shortfix to add class attribute

$class : string

Default

'displayer table'
 

The action to go to when the user clicks 'Yes' and the data is deleted.

$cleanupAction : string

Default

'show'

If you want to change to another controller you'll have to code it.

 

The request parameter used to store the confirmation

$confirmParameter : string

Default

'confirmed'
 

$db

$db : \Zend_Db_Adapter_Abstract

Default

 

When true the menu is displayed

$displayMenu : boolean

Default

true
 

Optional title to display at the head of this page.

$displayTitle : string

Default

 

the field or fields in appointments linking to this appointment

$filterOn : string | array

Default

 

The field in the model containing the yes/no filter

$filterWhen : string

Default

 

Required

$loader : \Gems_Loader

Default

 

Required

$menu : \Gems_Menu

Default

 

An optional list menu items

$menuList : \Gems_Menu_MenuList

Default

null
 

$model

$model : \MUtil_Model_ModelAbstract

Default

 

Required

$request : \Zend_Controller_Request_Abstract

Default