當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Institution::setInstitutionAcronym方法代碼示例

本文整理匯總了PHP中Institution::setInstitutionAcronym方法的典型用法代碼示例。如果您正苦於以下問題:PHP Institution::setInstitutionAcronym方法的具體用法?PHP Institution::setInstitutionAcronym怎麽用?PHP Institution::setInstitutionAcronym使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Institution的用法示例。


在下文中一共展示了Institution::setInstitutionAcronym方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: execute


//.........這裏部分代碼省略.........
             $isExistingAbstract = false;
         }
         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::setInstitutionAcronym方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。