protected function _authorizeAddComment($context)
    {
        if (isset($this->_entity->object)) {
            if (is_array($this->_entity->object)) {
                return false;
            }

            if (!$this->_entity->object->isAuthorizer()) {
                return false;
            }

            return $this->_entity->object->authorize('add.comment');
        } else {
            return false;
        }
    }
protected function _authorizeAddComment($context)
    {
        if (isset($this->_entity->object)) {
            if (is_array($this->_entity->object)) {
                return false;
            }

            if (!$this->_entity->object->isAuthorizer()) {
                return false;
            }

            return $this->_entity->object->authorize('add.comment');
        } else {
            return false;
        }
    }
protected function _authorizeAddComment ( $ context ) { if ( isset ( $ this -> _entity -> object ) ) { if ( is_array ( $ this -> _entity -> object ) ) { return false ; } if ( ! $ this -> _entity -> object -> isAuthorizer ( ) ) { return false ; } return $ this -> _entity -> object -> authorize ( 'add.comment' ) ; } else { return false ; } }
Checks if a comment can be added to a story.

@param AnCommandContext $context Context parameter

@return bool
Checks if a comment can be added to a story .