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;
}