Newscoop\Entity\Comment::getCommenterName PHP Метод

getCommenterName() публичный Метод

Get commenter name
public getCommenterName ( ) : string
Результат string
    public function getCommenterName()
    {
        return $this->getCommenter()->getName();
    }

Usage Example

 /**
  * Add to notification
  *
  * @return unknown_type
  */
 public function addComment(Comment $comment)
 {
     $notification = $this->getPrototype();
     // set content of the notification
     $content = array();
     $content[Notification::COMMENT_NAME] = $comment->getCommenterName();
     $content[Notification::COMMENT_EMAIL] = $comment->getCommenterEmail();
     $content[Notification::COMMENT_IP] = $comment->getIp();
     $content[Notification::COMMENT_SUBJECT] = $comment->getSubject();
     $content[Notification::COMMENT_MESSAGE] = $comment->getMessage();
     $content[Notification::COMMENT_PUBLICATION] = $comment->getPublicationId();
     //serialize the content
     $notification->setContent(serialize($content));
     $notification->setType(Notification::TYPE_COMMENT);
     $notification->setStatus(Notification::STATUS_PENDING);
     $this->getEntityManager()->persist($notification);
     $this->flush();
 }
All Usage Examples Of Newscoop\Entity\Comment::getCommenterName