code/controller/toolbar/actionbar.php
protected function _afterRead(ControllerContext $context)
    {
        $controller = $this->getController();

        if($controller->isEditable() && $controller->canSave()) {
            $this->addCommand('save');
        }

        if($controller->isEditable() && $controller->canApply()) {
            $this->addCommand('apply');
        }

        if($controller->isEditable() && $controller->canCancel()) {
            $this->addCommand('cancel',  array('attribs' => array('data-novalidate' => 'novalidate')));
        }
    }
protected function _afterRead(ControllerContext $context)
    {
        $controller = $this->getController();

        if($controller->isEditable() && $controller->canSave()) {
            $this->addCommand('save');
        }

        if($controller->isEditable() && $controller->canApply()) {
            $this->addCommand('apply');
        }

        if($controller->isEditable() && $controller->canCancel()) {
            $this->addCommand('cancel',  array('attribs' => array('data-novalidate' => 'novalidate')));
        }
    }
protected function _afterRead ( ControllerContext $ context ) { $ controller = $ this -> getController ( ) ; if ( $ controller -> isEditable ( ) && $ controller -> canSave ( ) ) { $ this -> addCommand ( 'save' ) ; } if ( $ controller -> isEditable ( ) && $ controller -> canApply ( ) ) { $ this -> addCommand ( 'apply' ) ; } if ( $ controller -> isEditable ( ) && $ controller -> canCancel ( ) ) { $ this -> addCommand ( 'cancel' , array ( 'attribs' => array ( 'data-novalidate' => 'novalidate' ) ) ) ; } }
Add default toolbar commands and set the toolbar title
.
@param ControllerContext	$context A controller context object
Add default toolbar commands and set the toolbar title .