/** * Adds columns from the model to the bridge that creates the browse table. * * Overrule this function to add different columns to the browse table, without * having to recode the core table building code. * * @param \MUtil_Model_Bridge_TableBridge $bridge * @param \MUtil_Model_ModelAbstract $model * @return void */ protected function addBrowseTableColumns(\MUtil_Model_Bridge_TableBridge $bridge, \MUtil_Model_ModelAbstract $model) { if ($model->has('row_class')) { $bridge->getTable()->tbody()->getFirst(true)->appendAttrib('class', $bridge->row_class); } if ($this->showMenu) { $showMenuItems = $this->getShowMenuItems(); foreach ($showMenuItems as $menuItem) { $bridge->addItemLink($menuItem->toActionLinkLower($this->request, $bridge)); } } // make sure search results are highlighted $this->applyTextMarker(); parent::addBrowseTableColumns($bridge, $model); if ($this->showMenu) { $editMenuItems = $this->getEditMenuItems(); foreach ($editMenuItems as $menuItem) { $bridge->addItemLink($menuItem->toActionLinkLower($this->request, $bridge)); } } }
/** * Adds columns from the model to the bridge that creates the browse table. * * Overrule this function to add different columns to the browse table, without * having to recode the core table building code. * * @param \MUtil_Model_Bridge_TableBridge $bridge * @param \MUtil_Model_ModelAbstract $model * @return void */ protected function addBrowseTableColumns(\MUtil_Model_Bridge_TableBridge $bridge, \MUtil_Model_ModelAbstract $model) { // make sure search results are highlighted $this->applyTextMarker(); parent::addBrowseTableColumns($bridge, $model); $bridge->getTable()->addColumn(null, $this->_('Action')); $td = $bridge->getTable()->tbody()->getLast()->getLast(); $td->class = 'fileAction'; foreach ($this->getFileIcons($bridge) as $icon => $item) { if (is_array($item)) { list($menuItem, $other) = $item; } else { $menuItem = $item; $other = null; } $this->addFileImage($td, $bridge, $icon, $menuItem, $other); } }