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


PHP Institution::setInstitutionInternational方法代码示例

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


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

示例1: execute


//.........这里部分代码省略.........
         if ($abstract != null) {
             $abstract->setArticleId($article->getId());
             $abstract->setLocale($localeKey);
             $abstract->setScientificTitle($abstracts[$localeKey]['scientificTitle']);
             $abstract->setPublicTitle($abstracts[$localeKey]['publicTitle']);
             $abstract->setBackground($abstracts[$localeKey]['background']);
             $abstract->setObjectives($abstracts[$localeKey]['objectives']);
             $abstract->setStudyMethods($abstracts[$localeKey]['studyMethods']);
             $abstract->setExpectedOutcomes($abstracts[$localeKey]['expectedOutcomes']);
             $abstract->setKeywords($abstracts[$localeKey]['keywords']);
             if ($isExistingAbstract == false) {
                 $article->addAbstract($abstract);
             }
         }
         unset($abstract);
     }
     ///////////////////////////////////////////
     ///////// Update Proposal Details /////////
     ///////////////////////////////////////////
     $proposalDetailsData = $this->getData('proposalDetails');
     import('classes.article.ProposalDetails');
     $proposalDetails = new ProposalDetails();
     $institutionDao =& DAORegistry::getDAO('InstitutionDAO');
     import('classes.journal.Institution');
     $proposalDetails->setArticleId($article->getId());
     $proposalDetails->setStudentResearch($proposalDetailsData['studentInitiatedResearch']);
     $proposalDetails->setStartDate($proposalDetailsData['startDate']);
     $proposalDetails->setEndDate($proposalDetailsData['endDate']);
     if ($proposalDetailsData['keyImplInstitution'] == "OTHER") {
         $institution = new Institution();
         $institution->setInstitutionName($proposalDetailsData['otherInstitutionName']);
         $institution->setInstitutionAcronym($proposalDetailsData['otherInstitutionAcronym']);
         $institution->setInstitutionType($proposalDetailsData['otherInstitutionType']);
         $institution->setInstitutionInternational($proposalDetailsData['international']);
         if ($proposalDetailsData['international'] == INSTITUTION_NATIONAL) {
             $institution->setInstitutionLocation($proposalDetailsData['locationCountry']);
         } elseif ($proposalDetailsData['international'] == INSTITUTION_INTERNATIONAL) {
             $institution->setInstitutionLocation($proposalDetailsData['locationInternational']);
         }
         $institutionId = $institutionDao->insertInstitution($institution);
         $proposalDetails->setKeyImplInstitution($institutionId);
         unset($institution);
     } else {
         $proposalDetails->setKeyImplInstitution($proposalDetailsData['keyImplInstitution']);
     }
     $proposalDetails->setMultiCountryResearch($proposalDetailsData['multiCountryResearch']);
     if ($proposalDetailsData['multiCountryResearch'] == PROPOSAL_DETAIL_YES) {
         $countriesArray = $proposalDetailsData['countries'];
         $countries = implode(",", $countriesArray);
         $proposalDetails->setCountries($countries);
     }
     $proposalDetails->setNationwide($proposalDetailsData['nationwide']);
     if ($proposalDetailsData['nationwide'] != PROPOSAL_DETAIL_YES) {
         $geoAreasArray = $proposalDetailsData['geoAreas'];
         $proposalDetails->setGeoAreasFromArray($geoAreasArray);
     }
     $researchDomainsArray = $proposalDetailsData['researchDomains'];
     $proposalDetails->setResearchDomainsFromArray($researchDomainsArray);
     $researchFieldsArray = $proposalDetailsData['researchFields'];
     foreach ($researchFieldsArray as $i => $field) {
         if ($field == "OTHER") {
             $otherField = $proposalDetailsData['otherResearchField'];
             if ($otherField != "") {
                 $researchFieldsArray[$i] = "Other (" . $otherField . ")";
             }
         }
开发者ID:JovanyJeff,项目名称:hrp,代码行数:67,代码来源:MetadataForm.inc.php

示例2: Institution

 /**
  * Internal function to return a Institution object from a row.
  * @param $row array
  * @return Section
  */
 function &_returnInstitutionFromRow(&$row)
 {
     $institution = new Institution();
     $institution->setInstitutionId($row['institution_id']);
     $institution->setInstitutionType($row['type']);
     $institution->setInstitutionInternational($row['international']);
     $institution->setInstitutionLocation($row['location']);
     $institution->setInstitutionName($row['name']);
     $institution->setInstitutionAcronym($row['acronym']);
     HookRegistry::call('InstitutionDAO::_returnInstitutionFromRow', array(&$institution, &$row));
     return $institution;
 }
开发者ID:JovanyJeff,项目名称:hrp,代码行数:17,代码来源:InstitutionDAO.inc.php

示例3: execute

 /**
  * Save changes to article.
  * @param $request Request
  * @return int the article ID
  */
 function execute(&$request)
 {
     $articleDao =& DAORegistry::getDAO('ArticleDAO');
     $articleDetailsDao =& DAORegistry::getDAO('ArticleDetailsDAO');
     $institutionDao =& DAORegistry::getDAO('InstitutionDAO');
     import('classes.journal.Institution');
     $article =& $this->article;
     $fundingSourcesData = $this->getData('fundingSources');
     $fundingSources = $article->getArticleFundingSources();
     $primarySponsorData = $this->getData('primarySponsor');
     $secondarySponsorsData = $this->getData('secondarySponsors');
     $secondarySponsors = $article->getArticleSecondarySponsors();
     $details = $article->getArticleDetails();
     $CROsData = $this->getData('CROs');
     $CROs = $article->getArticleCROs();
     $newInstitutions = array();
     // Remove deleted funding sources
     foreach ($fundingSources as $fundingSource) {
         $isPresent = false;
         foreach ($fundingSourcesData as $fundingSourceData) {
             if (!empty($fundingSourceData['id'])) {
                 if ($fundingSource->getId() == $fundingSourceData['id']) {
                     $isPresent = true;
                 }
             }
         }
         if (!$isPresent) {
             $article->removeArticleFundingSource($fundingSource->getId());
         }
         unset($isPresent);
         unset($fundingSource);
     }
     // Update / Insert funding sources
     foreach ($fundingSourcesData as $fundingSourceData) {
         if (isset($fundingSourceData['id'])) {
             $articleSource = $article->getArticleFundingSource($fundingSourceData['id']);
         } else {
             $articleSource = new ArticleSponsor();
         }
         $articleSource->setArticleId($article->getId());
         $articleSource->setType(ARTICLE_SPONSOR_TYPE_FUNDING);
         if ($fundingSourceData['institutionId'] == 'OTHER') {
             $institution = new Institution();
             $institution->setInstitutionName($fundingSourceData['name']);
             $institution->setInstitutionAcronym($fundingSourceData['acronym']);
             $institution->setInstitutionType($fundingSourceData['type']);
             $institution->setInstitutionInternational($fundingSourceData['location']);
             if ($fundingSourceData['location'] == INSTITUTION_NATIONAL) {
                 $institution->setInstitutionLocation($fundingSourceData['locationCountry']);
             } elseif ($fundingSourceData['location'] == INSTITUTION_INTERNATIONAL) {
                 $institution->setInstitutionLocation($fundingSourceData['locationInternational']);
             }
             $institutionId = $institutionDao->insertInstitution($institution);
             $articleSource->setInstitutionId($institutionId);
             $fundingSourceData['institutionId'] = $institutionId;
             array_push($newInstitutions, $fundingSourceData);
             unset($institution);
         } else {
             $articleSource->setInstitutionId($fundingSourceData['institutionId']);
         }
         $article->addArticleFundingSource($articleSource);
         unset($articleSource);
     }
     if (isset($primarySponsorData['id'])) {
         $primarySponsor = $article->getArticlePrimarySponsor();
     } else {
         $primarySponsor = new ArticleSponsor();
     }
     $primarySponsor->setArticleId($article->getId());
     $primarySponsor->setType(ARTICLE_SPONSOR_TYPE_PRIMARY);
     if ($primarySponsorData['institutionId'] == 'OTHER') {
         $found = false;
         foreach ($newInstitutions as $newInstitution) {
             if ($newInstitution['name'] == $primarySponsorData['name'] || $newInstitution['acronym'] == $primarySponsorData['acronym']) {
                 $found = $newInstitution['institutionId'];
             }
         }
         if (!$found) {
             $institution = new Institution();
             $institution->setInstitutionName($primarySponsorData['name']);
             $institution->setInstitutionAcronym($primarySponsorData['acronym']);
             $institution->setInstitutionType($primarySponsorData['type']);
             $institution->setInstitutionInternational($primarySponsorData['location']);
             if ($primarySponsorData['location'] == INSTITUTION_NATIONAL) {
                 $institution->setInstitutionLocation($primarySponsorData['locationCountry']);
             } elseif ($primarySponsorData['location'] == INSTITUTION_INTERNATIONAL) {
                 $institution->setInstitutionLocation($primarySponsorData['locationInternational']);
             }
             $institutionId = $institutionDao->insertInstitution($institution);
             $primarySponsor->setInstitutionId($institutionId);
             $primarySponsorData['institutionId'] = $institutionId;
             array_push($newInstitutions, $primarySponsorData);
             unset($institution);
         } else {
             $primarySponsor->setInstitutionId($found);
//.........这里部分代码省略.........
开发者ID:elavaud,项目名称:hrp_ct,代码行数:101,代码来源:AuthorSubmitStep5Form.inc.php

示例4: execute

 /**
  * Save institution.
  */
 function execute()
 {
     $institutionDao =& DAORegistry::getDAO('InstitutionDAO');
     if (isset($this->institutionId)) {
         $institution =& $institutionDao->getInstitutionById($this->institutionId);
     }
     if (!isset($institution)) {
         $institution = new Institution();
     }
     $institution->setInstitutionName($this->getData('name'));
     $institution->setInstitutionAcronym($this->getData('acronym'));
     $international = $this->getData('international');
     $institution->setInstitutionInternational($international);
     if ($international == INSTITUTION_NATIONAL) {
         $institution->setInstitutionLocation($this->getData('locationCountry'));
     } elseif ($international == INSTITUTION_INTERNATIONAL) {
         $institution->setInstitutionLocation($this->getData('locationInternational'));
     }
     $institution->setInstitutionType($this->getData('type'));
     if ($institution->getInstitutionId() != null) {
         $institutionDao->updateInstitution($institution);
     } else {
         $institutionDao->insertInstitution($institution);
     }
 }
开发者ID:JovanyJeff,项目名称:hrp,代码行数:28,代码来源:InstitutionForm.inc.php


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