/** * Generates the action icon or text wrapped in a link * @return boolean Returns TRUE on success. Otherwise returns FALSE. */ public function generate() { foreach ($this->renderer_config['actions'] as $actionname => $action) { $tplvals = array(); $tplvals['SKIN_IMG_PATH'] = $this->getSkinImgPath(); // modify actions in subclasses $action = $this->_modifyAction($action); if ((array_key_exists('perm', $action) == FALSE || array_key_exists('perm', $action) == TRUE && $this->item->hasPerm($action['perm']) == 1) && array_key_exists('render_as', $action) == TRUE) { switch ($action['render_as']) { case 'icon': $block = array_key_exists('url', $action) == TRUE ? 'ICON_LINK' : 'ICON_NOLINK'; $this->_buildAction($block, $action); break; case 'text': $block = array_key_exists('url', $action) == TRUE ? 'TEXT_LINK' : 'TEXT_NOLINK'; $this->_buildAction($block, $action); break; case 'toolinfotable': $this->_buildToolinfoTable($action); break; } } } return parent::generate(); }
/** * Creates the checkbox and set it to the template * @return boolean Returns TRUE on success. Otherwise returns FALSE. */ public function generate() { $tplvals = array(); $tplvals['CHECK_NAME'] = $this->config_fields['renderer']['chk_name'] . '[]'; $tplvals['CHECK_ID'] = $this->config_fields['renderer']['chk_name'] . '_' . $this->item->getId(); $tplvals['CHECK_VALUE'] = $this->item->getId(); $tplvals['CHECKED'] = ''; $this->tpl->setVariable($tplvals); return parent::generate(); }