/** * @return void */ public function show() { $this->view->errors = $this->getErrors(); return parent::show(); }
public function show() { $record = array("primaryKeyValue" => $this->primaryKeyValue); if (isset($this->view->{$this->name})) { $this->view->{$this->name} = array_merge($record, $this->view->{$this->name}); } else { $this->view->{$this->name} = $record; } return parent::show(); }
/** * @param type $aParams */ public function show($aParams = null) { $aParams = $this->actionController->getRequest()->getParams(); $aDefaultOptions = array('' => 'Not selected'); $aControlsValues = array(); foreach ($this->_aParams['controls'] as $sKey => $aValue) { $aControlsValues[$sKey] = array(); if (isset($aValue['values']) && !is_array($aValue['values'])) { switch ($aValue['values']) { case 'issue': $aQuery = $this->_oDbAdapter->select()->from($aValue['values'], array('id', 'title'))->where('application = ?', $aParams['aid']); $aControlsValues[$sKey] = $this->_oDbAdapter->fetchPairs($aQuery); break; default: break; } } if (!isset($this->_aParams['controls'][$sKey]['values']) || !is_array($aValue['values'])) { is_array($aControlsValues[$sKey]) ? $aControlsValues[$sKey] = $aDefaultOptions + $aControlsValues[$sKey] : $aDefaultOptions; } else { $aControlsValues[$sKey] = $this->_aParams['controls'][$sKey]['values']; } } $this->actionController->view->{$this->getName()} = array('controlsValues' => $aControlsValues); parent::show(); }