Adds Gems specific display details and helper functions plus fule buttons:

Items set are:

  • Display class: 'browser'

Extra helpers are:

  • Keyboard access: $this->keyboard & getHtmlOutput()
  • Menu helpers: $this->menu, findMenuItem()
  • Sort parameters: $sortParamAsc & $sortParamDesc
package Gems
subpackage Snippets
copyright Copyright (c) 2011 Erasmus MC
license New BSD License
since Class available since version 1.6.2

 Methods

Create the snippets content

getHtmlOutput(\Zend_View_Abstract $view) : \MUtil_Html_HtmlInterface

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

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

addBrowseTableColumns(\MUtil_Model_Bridge_TableBridge $bridge, \MUtil_Model_ModelAbstract $model) : void

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_TableBridge

$model

\MUtil_Model_ModelAbstract

addFileImage()

addFileImage(\MUtil_Html_HtmlElement $td, \MUtil_Model_Bridge_TableBridge $bridge, string $icon, \Gems_Menu_SubMenuItem $menuItem = null, mixed $options = null) : void
staticvar \MUtil_Html_HtmlElement $blank What to display when blank

Parameters

$td

\MUtil_Html_HtmlElement

The element / cell to add the conditional link

$bridge

\MUtil_Model_Bridge_TableBridge

$icon

string

Name of icon file

$menuItem

\Gems_Menu_SubMenuItem

The menu item to add

$options

mixed

Other values for for link (not used for blank)

Add the paginator panel to the table.

addPaginator(\MUtil_Html_TableElement $table, \Zend_Paginator $paginator) 

Only called when $this->browse is true. Overrule this function to define your own method.

$param \Zend_Paginator $paginator

Parameters

$table

$paginator

Make sure generic search text results are marked

applyTextMarker() : void

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

Parameters

$controller

string

$action

string

Returns

\Gems_Menu_SubMenuItem

Get the file icons

getFileIcons(\MUtil_Model_Bridge_TableBridge $bridge) : array

Parameters

$bridge

\MUtil_Model_Bridge_TableBridge

Returns

array$icon => $menuItem or array($menuItem, $other)

 Properties

 

Use keyboard to select row

$keyboard : boolean

Default

false
 

$menu

$menu : \Gems_Menu

Default

 

Shortfix to add class attribute

$class : string

Default

'browser'
 

The id of a div that contains the table.

$containingId : string

Default

 

$model

$model : \MUtil_Model_ModelAbstract

Default

 

The $request param that stores the ascending sort

$sortParamAsc : string

Default

'asrt'
 

The $request param that stores the descending sort

$sortParamDesc : string

Default

'dsrt'
 

$util

$util : \Gems_Util

Default