public function canExecute($action)
    {
        if (!$this->actor) {
            return false;
        }

        if (!$this->actor->isNotifiable()) {
            return false;
        }

        if ($this->actor->authorize('access') === false) {
            return false;
        }

        if ($this->actor->authorize('administration') === false) {
            return false;
        }

        return parent::canExecute($action);
    }
public function canExecute($action)
    {
        if (!$this->actor) {
            return false;
        }

        if (!$this->actor->isNotifiable()) {
            return false;
        }

        if ($this->actor->authorize('access') === false) {
            return false;
        }

        if ($this->actor->authorize('administration') === false) {
            return false;
        }

        return parent::canExecute($action);
    }
public function canExecute ( $ action ) { if ( ! $ this -> actor ) { return false ; } if ( ! $ this -> actor -> isNotifiable ( ) ) { return false ; } if ( $ this -> actor -> authorize ( 'access' ) === false ) { return false ; } if ( $ this -> actor -> authorize ( 'administration' ) === false ) { return false ; } return parent :: canExecute ( $ action ) ; }
Checks if this controller can be executed by the viewer.

@param string $action The action being executed

@return bool
Checks if this controller can be executed by the viewer .