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


PHP AbstractForm::readData方法代码示例

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


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

示例1: readData

 /**
  * @see Page::readData()
  */
 public function readData()
 {
     AbstractForm::readData();
     if (!count($_POST)) {
         if (isset($_GET['values']) && is_array($_GET['values'])) {
             $this->values = $_GET['values'];
             $this->submit();
         }
     }
     // get path to category icons
     foreach ($this->cachedCategories as $key => $category) {
         // add icon path
         if (!empty($category['categoryIconM'])) {
             // get relative path
             $path = '';
             if (empty($category['packageDir'])) {
                 $path = RELATIVE_WCF_DIR;
             } else {
                 $path = FileUtil::getRealPath(RELATIVE_WCF_DIR . $category['packageDir']);
             }
             $this->cachedCategories[$key]['categoryIconM'] = $path . $category['categoryIconM'];
         }
     }
     // get categories
     $this->categories = $this->getOptionTree('profile');
     if (count($this->categories) == 0) {
         $this->options = $this->getCategoryOptions('profile');
     }
     // insert default values
     foreach ($this->activeOptions as $name => $option) {
         if (isset($this->values[$name])) {
             $this->activeOptions[$name]['optionValue'] = $this->values[$name];
         }
     }
 }
开发者ID:joaocustodio,项目名称:EmuDevstore-1,代码行数:38,代码来源:MembersSearchForm.class.php

示例2: readData

 /**
  * @see	Form::readData()
  */
 public function readData()
 {
     parent::readData();
     // avoid problems when submit() is not called
     if ($this->source === null) {
         throw new IllegalLinkException();
     }
     // get available packages
     $this->cachedPackages = $this->getCache('packages-' . $this->source->sourceID, 'Packages');
     // get all dependent packages
     $this->packageDependencies = $this->getCache('package-dependency-' . $this->source->sourceID, 'PackageDependency');
     // get all available wcf setup resources
     $setupResources = $this->getCache('wcfsetup-resources', 'WcfSetupResource');
     foreach ($this->sources as $source) {
         $directory = FileUtil::getRelativePath($this->source->sourceDirectory, $source->sourceDirectory);
         // packages
         $packages = $this->getCache('packages-' . $source->sourceID, 'Packages');
         foreach ($packages['packages'] as $key => $val) {
             $packages['packages'][$key]['directory'] = $directory . $packages['packages'][$key]['directory'];
             $packages['packages'][$key]['source'] = $source;
         }
         $this->cachedPackages = array('hashes' => array_merge($this->cachedPackages['hashes'], $packages['hashes']), 'packages' => array_merge($this->cachedPackages['packages'], $packages['packages']));
         // dependencies
         $this->packageDependencies = array_merge($this->packageDependencies, $this->getCache('package-dependency-' . $source->sourceID, 'PackageDependency'));
     }
     // get package information
     $this->getRequestedPackage();
     // fetch all required packages
     $this->fetchDependencies($this->requestedPackageHash);
     // read previously selected packages
     $this->readSelectedPackages();
 }
开发者ID:ZerGabriel,项目名称:PackageBuilder,代码行数:35,代码来源:PreferredPackageForm.class.php

示例3: readData

 /**
  * @see Page::readData()
  */
 public function readData()
 {
     // alliance
     $this->alliance = Alliance::getByUserID(WCF::getUser()->userID, true);
     $this->interrelations = $this->alliance->getInterrelation();
     $this->interrelations[$this->alliance->allianceID] = $this->alliance;
     parent::readData();
 }
开发者ID:sonicmaster,项目名称:RPG,代码行数:11,代码来源:AllianceCircularCreateForm.class.php

示例4: readData

 /**
  * @see Page::readData()
  */
 public function readData()
 {
     parent::readData();
     $this->alliance = new Alliance($this->allianceID);
     if (!$this->alliance->allianceID || WCF::getUser()->ally_request || WCF::getUser()->ally_id) {
         require_once WCF_DIR . 'lib/system/exception/IllegalLinkException.class.php';
         throw new IllegalLinkException();
     }
 }
开发者ID:sonicmaster,项目名称:RPG,代码行数:12,代码来源:AllianceApplyForm.class.php

示例5: readData

 /**
  * @see Page::readData()
  */
 public function readData()
 {
     $this->fleetQueue = new FleetQueue(2);
     parent::readData();
     $this->getTargetPlanet();
     $this->fleetQueue->speedPercent = $this->speed;
     $this->missions = $this->fleetQueue->getMissions();
     $this->capacity = $this->fleetQueue->getCapacity() - $this->fleetQueue->getConsumption();
 }
开发者ID:sonicmaster,项目名称:RPG,代码行数:12,代码来源:FleetStartResourcesForm.class.php

示例6: readData

 /**
  * @see Page::readData()
  */
 public function readData()
 {
     // alliance
     $this->alliance = Alliance::getByUserID(WCF::getUser()->userID, true);
     // user
     if (empty($this->userID)) {
         require_once WCF_DIR . 'lib/system/exception/IllegalLinkException.class.php';
         throw new IllegalLinkException();
     }
     $this->user = new LWUser($this->userID);
     parent::readData();
 }
开发者ID:sonicmaster,项目名称:RPG,代码行数:15,代码来源:AllianceApplicationViewForm.class.php

示例7: readData

 /**
  * @see Page::readData()
  */
 public function readData()
 {
     if ($this->messageID) {
         $message = new NMessage($this->messageID);
         $sender = $message->getSender();
         if ($sender instanceof UserMessageSender) {
             $this->user = $sender->getUser();
             $this->username = $this->user->username;
             $this->subject = 'Re: ' . $message->subject;
         }
     } else {
         if ($this->userID) {
             $this->user = new LWUser($this->userID);
             $this->username = $this->user->username;
         }
     }
     parent::readData();
 }
开发者ID:Biggerskimo,项目名称:WOT-Game,代码行数:21,代码来源:MessageUserForm.class.php

示例8: readData

 /**
  * @see Page::readData()
  */
 public function readData()
 {
     $this->fleetQueue = new FleetQueue(1);
     parent::readData();
 }
开发者ID:sonicmaster,项目名称:RPG,代码行数:8,代码来源:FleetStartCoordinatesForm.class.php

示例9: readData

 /**
  * @see Page::readData()
  */
 public function readData()
 {
     $this->alliance = new Alliance($this->allianceID);
     $this->alliance2 = new AllianceEditor($this->allianceID2);
     if ($this->alliance2->getInterrelation($this->allianceID, $this->interrelationType) !== null) {
         require_once WCF_DIR . 'lib/system/exception/IllegalLinkException.class.php';
         throw new IllegalLinkException();
     }
     if (!$this->alliance2->getRank(true, 6)) {
         require_once WCF_DIR . 'lib/system/exception/PermissionDeniedException.class.php';
         throw new PermissionDeniedException();
     }
     AbstractForm::readData();
 }
开发者ID:sonicmaster,项目名称:RPG,代码行数:17,代码来源:AllianceInterrelationApplyForm.class.php

示例10: readData

 /**
  * @see Page::readData()
  */
 public function readData()
 {
     $this->alliance = new AllianceEditor($this->allianceID);
     parent::readData();
 }
开发者ID:sonicmaster,项目名称:RPG,代码行数:8,代码来源:AllianceAdministrationForm.class.php

示例11: readData

 /**
  * @see Page::readData()
  */
 public function readData()
 {
     parent::readData();
 }
开发者ID:sonicmaster,项目名称:RPG,代码行数:7,代码来源:AllianceCreateForm.class.php

示例12: readData

 /**
  * @see Page::readData()
  */
 public function readData()
 {
     parent::readData();
     $this->loadPlanetData();
 }
开发者ID:sonicmaster,项目名称:RPG,代码行数:8,代码来源:SimulatorForm.class.php

示例13: readData

 /**
  * @see Page::readData()
  */
 public function readData()
 {
     $this->alliance = new AllianceEditor($this->allianceID);
     $this->ranks = $this->alliance->getRank();
     parent::readData();
 }
开发者ID:sonicmaster,项目名称:RPG,代码行数:9,代码来源:AllianceRankListForm.class.php

示例14: readData

 /**
  * @see Page::readData()
  */
 public function readData()
 {
     parent::readData();
     // get preferred username
     if (!count($_POST)) {
         if (isset($_COOKIE[COOKIE_PREFIX . 'userID'])) {
             require_once WCF_DIR . 'lib/data/user/User.class.php';
             $user = new User(intval($_COOKIE[COOKIE_PREFIX . 'userID']));
             if ($user->userID) {
                 $this->username = $user->username;
             }
         }
     }
 }
开发者ID:CaribeSoy,项目名称:contest-wcf,代码行数:17,代码来源:LoginForm.class.php

示例15: readData

 /**
  * @see Page::readData()
  */
 public function readData()
 {
     parent::readData();
     $this->renderBoards();
     // default values
     if (!count($_POST)) {
         $ignoredBoardIDArray = array();
         $sql = "SELECT\tboardID\n\t\t\t\tFROM\twbb" . WBB_N . "_board_ignored_by_user\n\t\t\t\tWHERE\tuserID = " . WCF::getUser()->userID;
         $result = WCF::getDB()->sendQuery($sql);
         while ($row = WCF::getDB()->fetchArray($result)) {
             $ignoredBoardIDArray[] = $row['boardID'];
         }
         foreach ($this->boards as $board) {
             if (!in_array($board->boardID, $ignoredBoardIDArray) && $board->getPermission('canViewBoard')) {
                 $this->unignoredBoardIDArray[] = $board->boardID;
             }
         }
     }
 }
开发者ID:joaocustodio,项目名称:EmuDevstore-1,代码行数:22,代码来源:BoardIgnoreForm.class.php


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