public function isPublisher(User $user)
    {
        if ($this->publisher) {
            if ($this->publisher->getUser()->getId() === $user->getId()) {
                return true;
            }
        }

        return false;
    }
public function isPublisher(User $user)
    {
        if ($this->publisher) {
            if ($this->publisher->getUser()->getId() === $user->getId()) {
                return true;
            }
        }

        return false;
    }
public function isPublisher ( User $ user ) { if ( $ this -> publisher ) { if ( $ this -> publisher -> getUser ( ) -> getId ( ) === $ user -> getId ( ) ) { return true ; } } return false ; }
Returns a boolean indicating whether the given User is the publisher of the entry.

@param User $user

@return boolean
Returns a boolean indicating whether the given User is the publisher of the entry .