Publication::commentsEnabled PHP Method

commentsEnabled() public method

Alias for getCommentsEnabled
public commentsEnabled ( ) : boolean
return boolean
    public function commentsEnabled()
    {
        return $this->getCommentsEnabled();
    }

Usage Example

Ejemplo n.º 1
0
 protected function getCommentsEnabled()
 {
     $cacheService = \Zend_Registry::get('container')->getService('newscoop.cache');
     $cacheKey = $cacheService->getCacheKey(array('are_comments_enabled', $this->m_dbObject->getProperty('IdPublication'), $this->m_dbObject->getProperty('Type'), $this->m_dbObject->getArticleNumber(), $this->m_dbObject->getLanguageId()), 'publication');
     if ($cacheService->contains($cacheKey)) {
         return $cacheService->fetch($cacheKey);
     }
     $publicationObj = new Publication($this->m_dbObject->getProperty('IdPublication'));
     $articleTypeObj = new ArticleType($this->m_dbObject->getProperty('Type'));
     $commentsEnabled = $publicationObj->commentsEnabled() && $articleTypeObj->commentsEnabled() && $this->m_dbObject->commentsEnabled();
     $cacheService->save($cacheKey, $commentsEnabled);
     return $commentsEnabled;
 }
All Usage Examples Of Publication::commentsEnabled