NotificationManager::_getArticleTitle PHP Method

_getArticleTitle() public method

Helper function to get an article title from a notification's associated object
public _getArticleTitle ( $notification ) : string
$notification
return string
    function _getArticleTitle($notification)
    {
        assert($notification->getAssocType() == ASSOC_TYPE_SUBMISSION);
        assert(is_numeric($notification->getAssocId()));
        $articleDao = DAORegistry::getDAO('ArticleDAO');
        /* @var $articleDao ArticleDAO */
        $article = $articleDao->getById($notification->getAssocId());
        if (!$article) {
            return null;
        }
        return $article->getLocalizedTitle();
    }