public function hasAllowableAction(Action $action)
    {
        $currentAllowableActions = $this->getAllowableActions();
        if ($currentAllowableActions === null || count($currentAllowableActions->getAllowableActions()) === 0) {
            throw new IllegalStateException('Allowable Actions are not available!');
        }

        return in_array($action, $currentAllowableActions->getAllowableActions(), false);
    }
public function hasAllowableAction(Action $action)
    {
        $currentAllowableActions = $this->getAllowableActions();
        if ($currentAllowableActions === null || count($currentAllowableActions->getAllowableActions()) === 0) {
            throw new IllegalStateException('Allowable Actions are not available!');
        }

        return in_array($action, $currentAllowableActions->getAllowableActions(), false);
    }
public function hasAllowableAction ( Action $ action ) { $ currentAllowableActions = $ this -> getAllowableActions ( ) ; if ( $ currentAllowableActions === null || count ( $ currentAllowableActions -> getAllowableActions ( ) ) === 0 ) { throw new IllegalStateException ( 'Allowable Actions are not available!' ) ; } return in_array ( $ action , $ currentAllowableActions -> getAllowableActions ( ) , false ) ; }
Checks if the given action is an allowed action for the object

@param Action $action
@return boolean
Checks if the given action is an allowed action for the object