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


PHP Language::getAvailableContentLanguages方法代码示例

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


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

示例1: getAvailableContentLanguages

 /**
  * Returns a list of all available content languages.
  * 
  * @return	array
  */
 public static function getAvailableContentLanguages()
 {
     $availableLanguages = array();
     foreach (Language::getAvailableContentLanguages(PACKAGE_ID) as $language) {
         $availableLanguages[$language['languageID']] = WCF::getLanguage()->get('wcf.global.language.' . $language['languageCode']);
     }
     // sort languages
     StringUtil::sort($availableLanguages);
     return $availableLanguages;
 }
开发者ID:CaribeSoy,项目名称:contest-wcf,代码行数:15,代码来源:UserOptionListForm.class.php

示例2: readParameters

 /**
  * @see Page::readParameters()
  */
 public function readParameters()
 {
     parent::readParameters();
     if (isset($_POST['query'])) {
         $this->query = StringUtil::trim($_POST['query']);
         if (CHARSET != 'UTF-8') {
             $this->query = StringUtil::convertEncoding('UTF-8', CHARSET, $this->query);
         }
     }
     if (count(Language::getAvailableContentLanguages(PACKAGE_ID)) > 0) {
         $this->languageID = WCF::getLanguage()->getLanguageID();
     }
 }
开发者ID:joaocustodio,项目名称:EmuDevstore-1,代码行数:16,代码来源:TagSuggestPage.class.php

示例3: readData

 /**
  * @see Page::readData()
  */
 public function readData()
 {
     if (count(Language::getAvailableContentLanguages(PACKAGE_ID)) > 0) {
         $this->languageID = WCF::getLanguage()->getLanguageID();
     }
 }
开发者ID:0xLeon,项目名称:com.leon.pokemon.cheatdatabase.core,代码行数:9,代码来源:CheatDatabaseSuggestPage.class.php

示例4: readData

 /**
  * @see Page::readData()
  */
 public function readData()
 {
     parent::readData();
     // boards
     $this->boardOptions = Board::getBoardSelect(array(), true, true);
     // language
     $this->languages = Language::getAvailableContentLanguages();
     foreach ($this->languages as $languageID => $language) {
         $this->languages[$languageID] = WCF::getLanguage()->get('wcf.global.language.' . $language['languageCode']);
     }
     StringUtil::sort($this->languages);
 }
开发者ID:joaocustodio,项目名称:EmuDevstore-1,代码行数:15,代码来源:ThreadsMassProcessingForm.class.php

示例5: getAvailableLanguages

 /**
  * Returns a list of available languages.
  *
  * @return	array
  */
 protected function getAvailableLanguages()
 {
     $visibleLanguages = explode(',', WCF::getUser()->languageIDs);
     $availableLanguages = Language::getAvailableContentLanguages(PACKAGE_ID);
     foreach ($availableLanguages as $key => $language) {
         if (!in_array($language['languageID'], $visibleLanguages)) {
             unset($availableLanguages[$key]);
         }
     }
     return $availableLanguages;
 }
开发者ID:joaocustodio,项目名称:EmuDevstore-1,代码行数:16,代码来源:ThreadAddForm.class.php

示例6: getVisibleLanguageIDArray

 /**
  * Returns ids of visible languages.
  *
  * @return	array<integer>
  */
 public function getVisibleLanguageIDArray()
 {
     if ($this->visibleLanguageIDArray === null) {
         $this->visibleLanguageIDArray = array();
         if (!$this->spiderID && count(Language::getAvailableContentLanguages(PACKAGE_ID)) != 0) {
             $this->visibleLanguageIDArray[] = 0;
             if ($this->user->languageIDs) {
                 $this->visibleLanguageIDArray = array_merge($this->visibleLanguageIDArray, explode(',', $this->user->languageIDs));
             } else {
                 if (WCF::getLanguage()->isContentLanguage()) {
                     $this->visibleLanguageIDArray[] = WCF::getLanguage()->getLanguageID();
                 } else {
                     $this->visibleLanguageIDArray[] = Language::getDefaultLanguageID();
                 }
             }
         }
     }
     return $this->visibleLanguageIDArray;
 }
开发者ID:joaocustodio,项目名称:EmuDevstore-1,代码行数:24,代码来源:Session.class.php

示例7: updateTags

 /**
  * Updates the tags of this entry.
  *
  * @param	array<string>		$tagArray
  */
 public function updateTags($tagArray)
 {
     // include files
     require_once WCF_DIR . 'lib/data/tag/TagEngine.class.php';
     require_once WCF_DIR . 'lib/data/contest/TaggedContest.class.php';
     // save tags
     $tagged = new TaggedContest(null, array('contestID' => $this->contestID, 'taggable' => TagEngine::getInstance()->getTaggable('de.easy-coding.wcf.contest.entry')));
     $languageID = 0;
     if (count(Language::getAvailableContentLanguages()) > 0) {
         $languageID = WCF::getLanguage()->getLanguageID();
     }
     // delete old tags
     TagEngine::getInstance()->deleteObjectTags($tagged, array($languageID));
     // save new tags
     if (count($tagArray) > 0) {
         TagEngine::getInstance()->addTags($tagArray, $tagged, $languageID);
     }
 }
开发者ID:CaribeSoy,项目名称:contest-wcf,代码行数:23,代码来源:ContestEditor.class.php

示例8: getAvailableLanguages

 /**
  * @see ThreadAddForm::getAvailableLanguages()
  */
 protected function getAvailableLanguages()
 {
     $visibleLanguages = explode(',', WCF::getUser()->languageIDs);
     $availableLanguages = Language::getAvailableContentLanguages(PACKAGE_ID);
     foreach ($availableLanguages as $key => $language) {
         if (!in_array($language['languageID'], $visibleLanguages) && !$this->board->getModeratorPermission('canEditPost')) {
             unset($availableLanguages[$key]);
         }
     }
     return $availableLanguages;
 }
开发者ID:joaocustodio,项目名称:EmuDevstore-1,代码行数:14,代码来源:PostEditForm.class.php

示例9: readData

 /**
  * @see Page::readData()
  */
 public function readData()
 {
     parent::readData();
     // default values
     if (!count($_POST)) {
         $this->subject = $this->entry->subject;
         $this->text = $this->entry->message;
         $this->enableSmilies = $this->entry->enableSmilies;
         $this->enableHtml = $this->entry->enableHtml;
         $this->enableBBCodes = $this->entry->enableBBCodes;
         $this->enableSolution = $this->entry->enableSolution;
         $this->enableOpenSolution = $this->entry->enableOpenSolution;
         $this->enableParticipantCheck = $this->entry->enableParticipantCheck;
         $this->enablePricechoice = $this->entry->enablePricechoice;
         $this->priceExpireSeconds = $this->entry->priceExpireSeconds;
         $this->enableSponsorCheck = $this->entry->enableSponsorCheck;
         $this->userID = $this->entry->userID;
         $this->groupID = $this->entry->groupID;
         $this->state = $this->entry->state;
         $this->isFullDay = $this->entry->isFullDay;
         $this->fromTime = $this->entry->fromTime;
         $this->untilTime = $this->entry->untilTime;
         $this->classIDArray = array_keys($this->entry->getClasses());
         if ($this->groupID > 0) {
             $this->ownerID = $this->groupID;
         }
         // tags
         if (MODULE_TAGGING) {
             $this->tags = TaggingUtil::buildString($this->entry->getTags(array(count(Language::getAvailableContentLanguages()) > 0 ? WCF::getLanguage()->getLanguageID() : 0)));
         }
     }
     $from = $this->fromTime == 0 ? time() : $this->fromTime;
     $until = $this->untilTime == 0 ? time() : $this->untilTime;
     $this->eventDate = new ContestDate(array('isFullDay' => $this->isFullDay, 'fromDay' => date('d', $from), 'fromMonth' => date('m', $from), 'fromYear' => date('Y', $from), 'fromHour' => date('h', $from), 'fromMinute' => date('i', $from), 'untilDay' => date('d', $until), 'untilMonth' => date('m', $until), 'untilYear' => date('Y', $until), 'untilHour' => date('h', $until), 'untilMinute' => date('i', $until)));
     // get classes
     $this->classList = new ContestClassTree();
     $this->classList->readObjects();
     $this->availableClasses = ContestClass::getClasses();
     $this->states = $this->getStates();
     $this->availableGroups = ContestUtil::readAvailableGroups();
 }
开发者ID:CaribeSoy,项目名称:contest-wcf,代码行数:44,代码来源:ContestEditForm.class.php


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