/** * * @return integer */ public function getAuthorId() { return $this->author ? $this->author->getId() : false; }
/** * @param Author $author * @return string */ public function getAuthorsInfo(Author $author) { $institution = !empty($author->getInstitution()) ? $author->getInstitution() : $author->getInstitutionName(); $email = empty($author->getUser()) ? $author->getEmail() : $author->getUser()->getEmail(); $fullName = empty($author->getUser()) ? $author->getFullName() : $author->getUser()->getTitle() . ' ' . $author->getUser()->getFullName(); $text = ' <p id="author$' . $author->getId() . '"> <b>' . $this->translator->trans('author') . ': </b>' . $fullName . '</br>'; if (!empty($email)) { $text .= '<b>' . $this->translator->trans('email') . ': </b>' . $email . '</br>'; } if (!empty($institution)) { $text .= '<b>' . $this->translator->trans('institution') . ': </b>' . $institution . '</br>'; } if (!empty($author->getCountry())) { $text .= '<b>' . $this->translator->trans('country') . ': </b>' . $author->getCountry() . '</p><hr>'; } return $text; }