code/controller/behavior/permissible.php
public function canExecute($action)
    {
        $method  = 'can'.ucfirst($action);
        $methods = $this->getMixer()->getMethods();

        if (!isset($methods[$method]))
        {
            $actions = $this->getActions();
            $actions = array_flip($actions);

            $result = isset($actions[$action]);
        }
        else $result = $this->$method();

        return $result;
    }
public function canExecute($action)
    {
        $method  = 'can'.ucfirst($action);
        $methods = $this->getMixer()->getMethods();

        if (!isset($methods[$method]))
        {
            $actions = $this->getActions();
            $actions = array_flip($actions);

            $result = isset($actions[$action]);
        }
        else $result = $this->$method();

        return $result;
    }
public function canExecute ( $ action ) { $ method = 'can' . ucfirst ( $ action ) ; $ methods = $ this -> getMixer ( ) -> getMethods ( ) ; if ( ! isset ( $ methods [ $ method ] ) ) { $ actions = $ this -> getActions ( ) ; $ actions = array_flip ( $ actions ) ; $ result = isset ( $ actions [ $ action ] ) ; } else $ result = $ this -> $ method ( ) ; return $ result ; }
Check if an action can be executed

@param   string  $action Action name
@return  boolean True if the action can be executed, otherwise FALSE.
Check if an action can be executed