Ask Yes/No conformation for deletion and deletes item when confirmed.

Can be used for other uses than delete by overriding performAction().

package Gems
subpackage Snippets
copyright Copyright (c) 2014 Erasmus MC
license New BSD License
since Class available since version 1.6.5 24-sep-2014 18:26:00
inherited_from \Gems_Snippets_ModelItemYesNoDeleteSnippetAbstract

 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

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

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

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

 

Shortfix to add class attribute

$class : string

Default

'displayer'
 

$currentUser

$currentUser : \Gems_User_User

Default

 

Optional title to display at the head of this page.

$displayTitle : string

Default

 

Required

$loader : \Gems_Loader

Default

 

Required

$menu : \Gems_Menu

Default

 

$model

$model : \MUtil_Model_ModelAbstract

Default