示例#1
0
 /**
  * Initialize form data from current issue.
  */
 function initData($request)
 {
     if (isset($this->issue)) {
         $this->_data = array('title' => $this->issue->getTitle(null), 'volume' => $this->issue->getVolume(), 'number' => $this->issue->getNumber(), 'year' => $this->issue->getYear(), 'datePublished' => $this->issue->getDatePublished(), 'description' => $this->issue->getDescription(null), 'publicIssueId' => $this->issue->getPubId('publisher-id'), 'accessStatus' => $this->issue->getAccessStatus(), 'openAccessDate' => $this->issue->getOpenAccessDate(), 'showVolume' => $this->issue->getShowVolume(), 'showNumber' => $this->issue->getShowNumber(), 'showYear' => $this->issue->getShowYear(), 'showTitle' => $this->issue->getShowTitle(), 'styleFileName' => $this->issue->getStyleFileName(), 'originalStyleFileName' => $this->issue->getOriginalStyleFileName());
         // consider the additional field names from the public identifer plugins
         import('classes.plugins.PubIdPluginHelper');
         $pubIdPluginHelper = new PubIdPluginHelper();
         $pubIdPluginHelper->init($this, $this->issue);
         parent::initData();
     } else {
         $journal = $request->getJournal();
         switch ($journal->getSetting('publishingMode')) {
             case PUBLISHING_MODE_SUBSCRIPTION:
             case PUBLISHING_MODE_NONE:
                 $accessStatus = ISSUE_ACCESS_SUBSCRIPTION;
                 break;
             case PUBLISHING_MODE_OPEN:
             default:
                 $accessStatus = ISSUE_ACCESS_OPEN;
                 break;
         }
         $this->_data = array('showVolume' => 1, 'showNumber' => 1, 'showYear' => 1, 'showTitle' => 1, 'accessStatus' => $accessStatus);
     }
 }
示例#2
0
 /**
  * Initialize form data from current article.
  */
 function initData()
 {
     if (isset($this->article)) {
         $article =& $this->article;
         $this->_data = array('authors' => array(), 'title' => $article->getTitle(null), 'abstract' => $article->getAbstract(null), 'coverPageAltText' => $article->getCoverPageAltText(null), 'showCoverPage' => $article->getShowCoverPage(null), 'hideCoverPageToc' => $article->getHideCoverPageToc(null), 'hideCoverPageAbstract' => $article->getHideCoverPageAbstract(null), 'originalFileName' => $article->getOriginalFileName(null), 'fileName' => $article->getFileName(null), 'width' => $article->getWidth(null), 'height' => $article->getHeight(null), 'discipline' => $article->getDiscipline(null), 'subjectClass' => $article->getSubjectClass(null), 'subject' => $article->getSubject(null), 'coverageGeo' => $article->getCoverageGeo(null), 'coverageChron' => $article->getCoverageChron(null), 'coverageSample' => $article->getCoverageSample(null), 'type' => $article->getType(null), 'language' => $article->getLanguage(), 'sponsor' => $article->getSponsor(null), 'citations' => $article->getCitations(), 'hideAuthor' => $article->getHideAuthor());
         // consider the additional field names from the public identifer plugins
         import('classes.plugins.PubIdPluginHelper');
         $pubIdPluginHelper = new PubIdPluginHelper();
         $pubIdPluginHelper->init($this, $article);
         $authors =& $article->getAuthors();
         for ($i = 0, $count = count($authors); $i < $count; $i++) {
             array_push($this->_data['authors'], array('authorId' => $authors[$i]->getId(), 'firstName' => $authors[$i]->getFirstName(), 'middleName' => $authors[$i]->getMiddleName(), 'lastName' => $authors[$i]->getLastName(), 'affiliation' => $authors[$i]->getAffiliation(null), 'country' => $authors[$i]->getCountry(), 'countryLocalized' => $authors[$i]->getCountryLocalized(), 'email' => $authors[$i]->getEmail(), 'orcid' => $authors[$i]->getData('orcid'), 'url' => $authors[$i]->getUrl(), 'competingInterests' => $authors[$i]->getCompetingInterests(null), 'biography' => $authors[$i]->getBiography(null)));
             if ($authors[$i]->getPrimaryContact()) {
                 $this->setData('primaryContact', $i);
             }
         }
         if ($this->isEditor) {
             $this->setData('copyrightHolder', $article->getCopyrightHolder(null));
             $this->setData('copyrightYear', $article->getCopyrightYear());
             $this->setData('licenseURL', $article->getLicenseURL());
         }
     }
     return parent::initData();
 }
示例#3
0
 /**
  * Initialize form data from current issue.
  * returns issue id that it initialized the page with
  */
 function initData($issueId = null)
 {
     $issueDao =& DAORegistry::getDAO('IssueDAO');
     // retrieve issue by id, if not specified, then select first unpublished issue
     if (isset($issueId)) {
         $issue =& $issueDao->getIssueById($issueId);
     }
     if (isset($issue)) {
         $this->issue =& $issue;
         $this->_data = array('title' => $issue->getTitle(null), 'volume' => $issue->getVolume(), 'number' => $issue->getNumber(), 'year' => $issue->getYear(), 'datePublished' => $issue->getDatePublished(), 'description' => $issue->getDescription(null), 'publicIssueId' => $issue->getPubId('publisher-id'), 'accessStatus' => $issue->getAccessStatus(), 'openAccessDate' => $issue->getOpenAccessDate(), 'showVolume' => $issue->getShowVolume(), 'showNumber' => $issue->getShowNumber(), 'showYear' => $issue->getShowYear(), 'showTitle' => $issue->getShowTitle(), 'fileName' => $issue->getFileName(null), 'originalFileName' => $issue->getOriginalFileName(null), 'coverPageDescription' => $issue->getCoverPageDescription(null), 'coverPageAltText' => $issue->getCoverPageAltText(null), 'showCoverPage' => $issue->getShowCoverPage(null), 'hideCoverPageArchives' => $issue->getHideCoverPageArchives(null), 'hideCoverPageCover' => $issue->getHideCoverPageCover(null), 'styleFileName' => $issue->getStyleFileName(), 'originalStyleFileName' => $issue->getOriginalStyleFileName());
         // consider the additional field names from the public identifer plugins
         import('classes.plugins.PubIdPluginHelper');
         $pubIdPluginHelper = new PubIdPluginHelper();
         $pubIdPluginHelper->init($this, $issue);
         parent::initData();
         return $issue->getId();
     } else {
         $journal =& Request::getJournal();
         $showVolume = $journal->getSetting('publicationFormatVolume');
         $showNumber = $journal->getSetting('publicationFormatNumber');
         $showYear = $journal->getSetting('publicationFormatYear');
         $showTitle = $journal->getSetting('publicationFormatTitle');
         $this->setData('showVolume', $showVolume);
         $this->setData('showNumber', $showNumber);
         $this->setData('showYear', $showYear);
         $this->setData('showTitle', $showTitle);
         // set up the default values for volume, number and year
         $issueDao =& DAORegistry::getDAO('IssueDAO');
         $issue = $issueDao->getLastCreatedIssue($journal->getId());
         if (isset($issue)) {
             $volumePerYear = $journal->getSetting('volumePerYear');
             $issuePerVolume = $journal->getSetting('issuePerVolume');
             $number = $issue->getNumber();
             $volume = $issue->getVolume();
             $year = $issue->getYear();
             if ($showVolume && $showNumber && $showYear) {
                 $number++;
                 if ($issuePerVolume && $number > $issuePerVolume) {
                     $number = 1;
                     $volume++;
                     if ($volumePerYear && $volume > $volumePerYear) {
                         $volume = 1;
                         $year++;
                     }
                 }
             } elseif ($showVolume && $showNumber) {
                 $number++;
                 if ($issuePerVolume && $number > $issuePerVolume) {
                     $number = 1;
                     $volume++;
                 }
             } elseif ($showVolume && $showYear) {
                 $number = 0;
                 $volume++;
                 if ($volumePerYear && $volume > $volumePerYear) {
                     $volume = 1;
                     $year++;
                 }
             } elseif ($showYear) {
                 $volume = $number = 0;
                 $year++;
             } else {
                 $year = $volume = $number = 0;
             }
         } else {
             $volume = $journal->getSetting('initialVolume');
             $number = $journal->getSetting('initialNumber');
             $year = $journal->getSetting('initialYear');
         }
         switch ($journal->getSetting('publishingMode')) {
             case PUBLISHING_MODE_SUBSCRIPTION:
             case PUBLISHING_MODE_NONE:
                 $accessStatus = ISSUE_ACCESS_SUBSCRIPTION;
                 break;
             case PUBLISHING_MODE_OPEN:
             default:
                 $accessStatus = ISSUE_ACCESS_OPEN;
                 break;
         }
         $this->_data = array('showVolume' => $showVolume, 'showNumber' => $showNumber, 'showYear' => $showYear, 'showTitle' => $showTitle, 'volume' => $volume, 'number' => $number, 'year' => $year, 'accessStatus' => $accessStatus);
     }
 }
 /**
  * Initialize form data from current galley (if applicable).
  */
 function initData()
 {
     if (isset($this->galley)) {
         $galley =& $this->galley;
         $this->_data = array('label' => $galley->getLabel(), 'publicGalleyId' => $galley->getPubId('publisher-id'), 'galleyLocale' => $galley->getLocale());
     } else {
         $this->_data = array();
     }
     // consider the additional field names from the public identifer plugins
     import('classes.plugins.PubIdPluginHelper');
     $pubIdPluginHelper = new PubIdPluginHelper();
     $pubIdPluginHelper->init($this, $galley);
     parent::initData();
 }
示例#5
0
 /**
  * Initialize form data from current supplementary file (if applicable).
  */
 function initData()
 {
     if (isset($this->suppFile)) {
         $suppFile =& $this->suppFile;
         $this->_data = array('title' => $suppFile->getTitle(null), 'creator' => $suppFile->getCreator(null), 'subject' => $suppFile->getSubject(null), 'type' => $suppFile->getType(), 'typeOther' => $suppFile->getTypeOther(null), 'description' => $suppFile->getDescription(null), 'publisher' => $suppFile->getPublisher(null), 'sponsor' => $suppFile->getSponsor(null), 'dateCreated' => $suppFile->getDateCreated(), 'source' => $suppFile->getSource(null), 'language' => $suppFile->getLanguage(), 'showReviewers' => $suppFile->getShowReviewers() == 1 ? 1 : 0, 'publicSuppFileId' => $suppFile->getPubId('publisher-id'));
     } else {
         $this->_data = array('type' => '', 'showReviewers' => 1);
     }
     // consider the additional field names from the public identifer plugins
     import('classes.plugins.PubIdPluginHelper');
     $pubIdPluginHelper = new PubIdPluginHelper();
     $pubIdPluginHelper->init($this, $suppFile);
     return parent::initData();
 }