Newscoop\Entity\Publication::getCommentsEnabled PHP Метод

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

Gets the value of commentsEnabled.
public getCommentsEnabled ( ) : boolean
Результат boolean
    public function getCommentsEnabled()
    {
        return $this->commentsEnabled;
    }

Usage Example

Пример #1
0
 private function getModeratorEmailIfModerationEnabled(Publication $publication, $user = null)
 {
     if ($publication->getCommentsEnabled()) {
         if ($publication->getCommentsSubscribersModerated() && ($publication->getPublicCommentsEnabled() && $publication->getCommentsPublicModerated())) {
             return $publication->getModeratorTo();
         }
         if ($publication->getPublicCommentsEnabled() && $publication->getCommentsPublicModerated() && !$publication->getCommentsSubscribersModerated() && !$user || $publication->getCommentsSubscribersModerated() && !($publication->getPublicCommentsEnabled() && $publication->getCommentsPublicModerated()) && $user) {
             return $publication->getModeratorTo();
         }
     }
 }