当前位置: 首页>>代码示例>>PHP>>正文


PHP Section::setReviewFormId方法代码示例

本文整理汇总了PHP中Section::setReviewFormId方法的典型用法代码示例。如果您正苦于以下问题:PHP Section::setReviewFormId方法的具体用法?PHP Section::setReviewFormId怎么用?PHP Section::setReviewFormId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Section的用法示例。


在下文中一共展示了Section::setReviewFormId方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: execute

 /**
  * Save section.
  */
 function execute()
 {
     $journal =& Request::getJournal();
     $journalId = $journal->getId();
     // We get the section DAO early on so that
     // the section class will be imported.
     $sectionDao =& DAORegistry::getDAO('SectionDAO');
     $section =& $this->section;
     if (!is_a($section, 'Section')) {
         $section = new Section();
         $section->setJournalId($journalId);
         $section->setSequence(REALLY_BIG_NUMBER);
     }
     $section->setTitle($this->getData('title'), null);
     // Localized
     $section->setAbbrev($this->getData('abbrev'), null);
     // Localized
     $reviewFormId = $this->getData('reviewFormId');
     if ($reviewFormId === '') {
         $reviewFormId = null;
     }
     $section->setReviewFormId($reviewFormId);
     $section->setMetaIndexed($this->getData('metaIndexed') ? 0 : 1);
     // #2066: Inverted
     $section->setMetaReviewed($this->getData('metaReviewed') ? 0 : 1);
     // #2066: Inverted
     $section->setAbstractsNotRequired($this->getData('abstractsNotRequired') ? 1 : 0);
     $section->setIdentifyType($this->getData('identifyType'), null);
     // Localized
     $section->setEditorRestricted($this->getData('editorRestriction') ? 1 : 0);
     $section->setHideTitle($this->getData('hideTitle') ? 1 : 0);
     $section->setHideAuthor($this->getData('hideAuthor') ? 1 : 0);
     $section->setHideAbout($this->getData('hideAbout') ? 1 : 0);
     $section->setDisableComments($this->getData('disableComments') ? 1 : 0);
     $section->setPolicy($this->getData('policy'), null);
     // Localized
     $section->setAbstractWordCount($this->getData('wordCount'));
     $section =& parent::execute($section);
     if ($section->getId() != null) {
         $sectionDao->updateSection($section);
         $sectionId = $section->getId();
     } else {
         $sectionId = $sectionDao->insertSection($section);
         $sectionDao->resequenceSections($journalId);
     }
     // Save assigned editors
     $assignedEditorIds = Request::getUserVar('assignedEditorIds');
     if (empty($assignedEditorIds)) {
         $assignedEditorIds = array();
     } elseif (!is_array($assignedEditorIds)) {
         $assignedEditorIds = array($assignedEditorIds);
     }
     $sectionEditorsDao =& DAORegistry::getDAO('SectionEditorsDAO');
     $sectionEditorsDao->deleteEditorsBySectionId($sectionId, $journalId);
     foreach ($this->sectionEditors as $key => $junk) {
         $sectionEditor =& $this->sectionEditors[$key];
         $userId = $sectionEditor->getId();
         // We don't have to worry about omit- and include-
         // section editors because this function is only called
         // when the Save button is pressed and those are only
         // used in other cases.
         if (in_array($userId, $assignedEditorIds)) {
             $sectionEditorsDao->insertEditor($journalId, $sectionId, $userId, Request::getUserVar('canReview' . $userId), Request::getUserVar('canEdit' . $userId));
         }
         unset($sectionEditor);
     }
 }
开发者ID:farhanabbas1983,项目名称:ojs-1,代码行数:70,代码来源:SectionForm.inc.php

示例2: importSections

 function importSections()
 {
     assert($this->xml->name == 'sections');
     $sectionDAO =& DAORegistry::getDAO('SectionDAO');
     $sectionEditorsDAO =& DAORegistry::getDAO('SectionEditorsDAO');
     $sections = $sectionDAO->getJournalSections($this->journal->getId());
     $this->nextElement();
     while ($this->xml->name == 'section') {
         $sectionXML = $this->getCurrentElementAsDom();
         $section = new Section();
         $section->setJournalId($this->journal->getId());
         $section->setReviewFormId($this->idTranslationTable->resolve(INTERNAL_TRANSFER_OBJECT_REVIEW_FORM, (int) $sectionXML->reviewFormId));
         $section->setSequence((int) $sectionXML->sequence);
         $section->setMetaIndexed((string) $sectionXML->metaIndexed);
         $section->setMetaReviewed((string) $sectionXML->metaReviewed);
         $section->setAbstractsNotRequired((int) $sectionXML->abstractsNotRequired);
         $section->setEditorRestricted((int) $sectionXML->editorRestricted);
         $section->setHideTitle((int) $sectionXML->hideTitle);
         $section->setHideAuthor((int) $sectionXML->hideAuthor);
         $section->setHideAbout((int) $sectionXML->hideAbout);
         $section->setDisableComments((int) $sectionXML->disableComments);
         $section->setAbstractWordCount((int) $sectionXML->wordCount);
         $sectionDAO->insertSection($section);
         $this->idTranslationTable->register(INTERNAL_TRANSFER_OBJECT_SECTION, (int) $sectionXML->oldId, $section->getId());
         $this->restoreDataObjectSettings($sectionDAO, $sectionXML->settings, 'section_settings', 'section_id', $section->getId());
         foreach ($sectionXML->sectionEditor as $sectionEditorXML) {
             $userId = $this->idTranslationTable->resolve(INTERNAL_TRANSFER_OBJECT_USER, (int) $sectionEditorXML->userId);
             $canReview = (int) $sectionEditorXML->canReview;
             $canEdit = (int) $sectionEditorXML->canEdit;
             $sectionEditorsDAO->insertEditor($this->journal->getId(), $section->getId(), $userId, $canReview, $canEdit);
         }
         $this->nextElement();
     }
 }
开发者ID:ulsdevteam,项目名称:fullJournalTransfer,代码行数:34,代码来源:XMLDisassembler.inc.php

示例3: Section

 /**
  * Internal function to return a Section object from a row.
  * @param $row array
  * @return Section
  */
 function &_returnSectionFromRow(&$row)
 {
     $section = new Section();
     $section->setId($row['section_id']);
     $section->setJournalId($row['journal_id']);
     $section->setReviewFormId($row['review_form_id']);
     $section->setSequence($row['seq']);
     $section->setMetaIndexed($row['meta_indexed']);
     $section->setMetaReviewed($row['meta_reviewed']);
     $section->setAbstractsNotRequired($row['abstracts_not_required']);
     $section->setEditorRestricted($row['editor_restricted']);
     $section->setHideTitle($row['hide_title']);
     $section->setHideAuthor($row['hide_author']);
     $section->setHideAbout($row['hide_about']);
     $section->setDisableComments($row['disable_comments']);
     $section->setAbstractWordCount($row['abstract_word_count']);
     $this->getDataObjectSettings('section_settings', 'section_id', $row['section_id'], $section);
     HookRegistry::call('SectionDAO::_returnSectionFromRow', array(&$section, &$row));
     return $section;
 }
开发者ID:EreminDm,项目名称:water-cao,代码行数:25,代码来源:SectionDAO.inc.php

示例4: execute

 /**
  * Save section.
  */
 function execute()
 {
     $journal =& Request::getJournal();
     $journalId = $journal->getId();
     $sectionDao =& DAORegistry::getDAO('SectionDAO');
     if (isset($this->sectionId)) {
         $section =& $sectionDao->getSection($this->sectionId, $journalId);
     }
     if (!isset($section)) {
         $section = new Section();
         $section->setJournalId($journalId);
         $section->setSequence(REALLY_BIG_NUMBER);
     }
     $section->setTitle($this->getData('title'), null);
     // Localized
     $section->setAbbrev($this->getData('abbrev'), null);
     // Localized
     // Added region
     // EL on Febraurt 11th 2013
     $section->setRegion($this->getData('region'), null);
     $reviewFormId = $this->getData('reviewFormId');
     if ($reviewFormId === '') {
         $reviewFormId = null;
     }
     $section->setReviewFormId($reviewFormId);
     $section->setMetaIndexed($this->getData('metaIndexed') ? 0 : 1);
     // #2066: Inverted
     $section->setMetaReviewed($this->getData('metaReviewed') ? 0 : 1);
     // #2066: Inverted
     $section->setAbstractsNotRequired($this->getData('abstractsNotRequired') ? 1 : 0);
     $section->setIdentifyType($this->getData('identifyType'), null);
     // Localized
     $section->setEditorRestricted($this->getData('editorRestriction') ? 1 : 0);
     $section->setHideTitle($this->getData('hideTitle') ? 1 : 0);
     $section->setHideAuthor($this->getData('hideAuthor') ? 1 : 0);
     $section->setHideAbout($this->getData('hideAbout') ? 1 : 0);
     $section->setDisableComments($this->getData('disableComments') ? 1 : 0);
     $section->setPolicy($this->getData('policy'), null);
     // Localized
     $section->setAbstractWordCount($this->getData('wordCount'));
     if ($section->getId() != null) {
         $sectionDao->updateSection($section);
         $sectionId = $section->getId();
     } else {
         $sectionId = $sectionDao->insertSection($section);
         $sectionDao->resequenceSections($journalId);
     }
 }
开发者ID:elavaud,项目名称:hrp_ct,代码行数:51,代码来源:SectionForm.inc.php


注:本文中的Section::setReviewFormId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。