Exemplo n.º 1
0
 /**
  * Get action
  *
  * This function translates a GET request into a read or browse action. If the view name is singular a read action
  * will be executed, if plural a browse action will be executed.
  *
  * @param   ControllerContextModel $context  A controller context object
  * @return  string|bool The rendered output of the view or FALSE if something went wrong
  */
 protected function _actionRender(ControllerContextModel $context)
 {
     $result = false;
     //Check if we are reading or browsing
     $action = $this->getView()->isCollection() ? 'browse' : 'read';
     //Execute the action
     if ($this->execute($action, $context) !== false) {
         $result = parent::_actionRender($context);
     }
     return $result;
 }
Exemplo n.º 2
0
 /**
  * Render action
  *
  * This function translates a render request into a read or browse action. If the view name is singular a read
  * action will be executed, if plural a browse action will be executed.
  *
  * @param	CommandContext	$context A command context object
  * @return 	string|false 	The rendered output of the view or FALSE if something went wrong
  */
 protected function _actionRender(CommandContext $context)
 {
     //Check if we are reading or browsing
     $action = StringInflector::isSingular($this->getView()->getName()) ? 'read' : 'browse';
     //Execute the action
     $this->execute($action, $context);
     return parent::_actionRender($context);
 }