24 define (
'AUTHOR_TOC_DEFAULT', 0);
25 define (
'AUTHOR_TOC_HIDE', 1);
26 define (
'AUTHOR_TOC_SHOW', 2);
29 define(
'ARTICLE_ACCESS_ISSUE_DEFAULT', 0);
30 define(
'ARTICLE_ACCESS_OPEN', 1);
32 import(
'lib.pkp.classes.submission.PKPSubmission');
51 case PERMISSIONS_FIELD_LICENSE_URL:
52 $fieldValue = $context->getData(
'licenseUrl');
54 case PERMISSIONS_FIELD_COPYRIGHT_HOLDER:
55 switch($context->getData(
'copyrightHolderType')) {
57 $fieldValue = array($context->getPrimaryLocale() => $this->getAuthorString());
61 $fieldValue = $context->getName(
null);
64 $fieldValue = $context->getData(
'copyrightHolderOther');
68 case PERMISSIONS_FIELD_COPYRIGHT_YEAR:
70 $fieldValue = date(
'Y');
77 switch($context->getData(
'copyrightYearBasis')) {
80 $fieldValue = date(
'Y', strtotime($publication->getData(
'datePublished')));
83 if ($publication->getData(
'issueId')) {
86 $issue = $issueDao->getBySubmissionId($this->
getId());
87 if ($issue && $issue->getDatePublished()) {
88 $fieldValue = date(
'Y', strtotime($issue->getDatePublished()));
92 default: assert(
false);
96 default: assert(
false);
100 if ($locale ===
null)
return $fieldValue;
101 if (isset($fieldValue[$locale]))
return $fieldValue[$locale];
111 return parent::getBestId();
120 return $this->
getData(
'contextId');
129 return $this->
setData(
'contextId', $journalId);
141 return $publication->getData(
'sectionId');
151 $publication->setData(
'sectionId', $sectionId);
165 $coverImage = $publication->getLocalizedData(
'coverImage');
166 return empty($coverImage[
'uploadName']) ?
'' : $coverImage[
'uploadName'];
180 $coverImage = $publication->getData(
'coverImage', $locale);
181 return empty($coverImage[
'uploadName']) ?
'' : $coverImage[
'uploadName'];
194 $coverImage = $publication->getLocalizedData(
'coverImage');
195 return empty($coverImage[
'altText']) ?
'' : $coverImage[
'altText'];
209 $coverImage = $publication->getData(
'coverImage', $locale);
210 return empty($coverImage[
'altText']) ?
'' : $coverImage[
'altText'];
224 return $publication->getLocalizedCoverImageUrl($this->
getData(
'contextId'));
233 $galleys = $this->
getData(
'galleys');
234 if (is_null($galleys)) {
236 return $this->
getData(
'galleys');
247 $allGalleys = $this->
getData(
'galleys');
250 foreach (array_keys($allGalleys) as $key) {
251 if ($allGalleys[$key]->
getLocale() == $tryLocale) {
252 $galleys[] = $allGalleys[$key];
255 if (!empty($galleys)) {
256 HookRegistry::call(
'ArticleGalleyDAO::getLocalizedGalleysByArticle', array(&$galleys));
274 return $publication->getData(
'hideAuthor');