Exemplo n.º 1
0
 /**
  * Add a command
  * 
  * Disable the tabbar only for singular views that are editable.
  *
  * @param   string	The command name
  * @param	mixed	Parameters to be passed to the command
  * @return  Library\ControllerToolbarCommand
  */
 public function addCommand($name, $config = array())
 {
     $command = parent::addCommand($name, $config);
     $controller = $this->getController();
     if ($controller->isEditable() && Library\StringInflector::isSingular($controller->getView()->getName())) {
         $command->disabled = true;
     }
     return $command;
 }