Newscoop\Entity\Repository\AttachmentRepository::getDescription PHP Метод

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

Get attachment decritpion
public getDescription ( integer $attachmentId ) : Translation
$attachmentId integer
Результат Newscoop\Entity\Translation
    public function getDescription($attachmentId)
    {
        $em = $this->getEntityManager();
        $attachment = $em->getRepository('Newscoop\\Entity\\Attachment')->findOneById($attachmentId);
        $description = $em->getRepository('Newscoop\\Entity\\Translation')->findBy(array('phraseId' => $attachment->getDescriptionId(), 'language' => $attachment->getLanguage()));
        return $description;
    }