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


PHP AbstractForm::readData方法代码示例

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


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

示例1: readData

 /**
  * @see	\wcf\page\IPage::readData()
  */
 public function readData()
 {
     I18nHandler::getInstance()->register('description');
     I18nHandler::getInstance()->register('name');
     parent::readData();
     $this->typeList = new \wcf\data\jcoins\shop\item\type\JCoinsShopItemTypeList();
 }
开发者ID:jacboy,项目名称:JCoins,代码行数:10,代码来源:JCoinsShopItemAddForm.class.php

示例2: readData

 /**
  * @see	\wcf\page\IPage::readData()
  */
 public function readData()
 {
     $this->objectTypes = ObjectTypeCache::getInstance()->getObjectTypes('com.woltlab.wcf.user.activityPointEvent');
     if (empty($_POST)) {
         foreach ($this->objectTypes as $objectType) {
             $this->points[$objectType->objectTypeID] = $objectType->points;
         }
     }
     parent::readData();
 }
开发者ID:nick-strohm,项目名称:WCF,代码行数:13,代码来源:UserActivityPointOptionForm.class.php

示例3: readData

 /**
  * @see	\wcf\page\IPage::readData()
  */
 public function readData()
 {
     if (!WCF::getUser()->userID && $this->useCaptcha && $this->captchaObjectTypeName) {
         $this->captchaObjectType = CaptchaHandler::getInstance()->getObjectTypeByName($this->captchaObjectTypeName);
         if ($this->captchaObjectType === null) {
             throw new SystemException("Unknown captcha object type with name '" . $this->captchaObjectTypeName . "'");
         }
         if (!$this->captchaObjectType->getProcessor()->isAvailable()) {
             $this->captchaObjectType = null;
         }
     }
     parent::readData();
 }
开发者ID:nick-strohm,项目名称:WCF,代码行数:16,代码来源:AbstractCaptchaForm.class.php

示例4: readData

 /**
  * @see	\wcf\page\IPage::readData()
  */
 public function readData()
 {
     $this->userGroups = UserGroup::getGroupsByType(array(), array(UserGroup::EVERYONE, UserGroup::GUESTS, UserGroup::USERS));
     foreach ($this->userGroups as $key => $userGroup) {
         if (!$userGroup->isAccessible()) {
             unset($this->userGroups[$key]);
         }
     }
     uasort($this->userGroups, function (UserGroup $groupA, UserGroup $groupB) {
         return strcmp($groupA->getName(), $groupB->getName());
     });
     $this->conditions = UserGroupAssignmentHandler::getInstance()->getGroupedObjectTypes('com.woltlab.wcf.condition.userGroupAssignment');
     parent::readData();
 }
开发者ID:nick-strohm,项目名称:WCF,代码行数:17,代码来源:UserGroupAssignmentAddForm.class.php

示例5: readData

 /**
  * @see	\wcf\page\IPage::readData()
  */
 public function readData()
 {
     parent::readData();
     // set default values
     if (empty($_POST)) {
         $dateTime = DateUtil::getDateTimeByTimestamp(TIME_NOW);
         $dateTime->setTimezone(WCF::getUser()->getTimeZone());
         $this->deactivationDate = $this->publicationDate = $dateTime->format('c');
     }
     $pageNodeTree = new PageNodeTree();
     $this->pageList = $pageNodeTree->getIterator();
     $this->stylesheetList = new StylesheetList();
     $this->stylesheetList->readObjects();
     // load menu items
     $menuItemList = new PageMenuItemList();
     $menuItemList->getConditionBuilder()->add('page_menu_item.menuPosition = ?', array('header'));
     $menuItemList->sqlOrderBy = 'page_menu_item.parentMenuItem ASC, page_menu_item.showOrder ASC';
     $menuItemList->readObjects();
     foreach ($menuItemList as $menuItem) {
         if ($menuItem->parentMenuItem) {
             if (isset($this->menuItems[$menuItem->parentMenuItem])) {
                 $this->menuItems[$menuItem->parentMenuItem]->addChild($menuItem);
             }
         } else {
             $this->menuItems[$menuItem->menuItem] = new ViewablePageMenuItem($menuItem);
         }
     }
 }
开发者ID:knzo,项目名称:Fireball,代码行数:31,代码来源:PageAddForm.class.php

示例6: readData

 /**
  * @see	\wcf\page\IPage::readData()
  */
 public function readData()
 {
     parent::readData();
     if (empty($_POST) && $this->languageID) {
         $language = LanguageFactory::getInstance()->getLanguage($this->languageID);
         if ($language === null) {
             throw new IllegalLinkException();
         }
         $this->language = new LanguageEditor($language);
     }
     $this->readPackages();
 }
开发者ID:nick-strohm,项目名称:WCF,代码行数:15,代码来源:LanguageExportForm.class.php

示例7: readData

	/**
	 * @see	wcf\page\IPage::readData()
	 */
	public function readData() {
		parent::readData();
		
		// get preferred username
		if (empty($_POST)) {
			if (isset($_COOKIE[COOKIE_PREFIX.'userID'])) {
				$user = new User(intval($_COOKIE[COOKIE_PREFIX.'userID']));
				if ($user->userID) $this->username = $user->username;
			}
		}
	}
开发者ID:0xLeon,项目名称:WCF,代码行数:14,代码来源:LoginForm.class.php

示例8: readData

 /**
  * @see	\wcf\page\IPage::readData()
  */
 public function readData()
 {
     parent::readData();
     // read page list
     $pageNodeTree = new PageNodeTree();
     $this->pageList = $pageNodeTree->getIterator();
     // read content list
     $contentNodeTree = new ContentNodeTree(null, 0, 1);
     $this->contentList = $contentNodeTree->getIterator();
 }
开发者ID:knzo,项目名称:Fireball,代码行数:13,代码来源:ContentAddForm.class.php

示例9: readData

 /**
  * @see	\wcf\page\IPage::readData()
  */
 public function readData()
 {
     parent::readData();
     if (!isset($_POST['fileSystemPath'])) {
         $this->fileSystemPath = !empty($_SERVER['DOCUMENT_ROOT']) ? $_SERVER['DOCUMENT_ROOT'] : WCF_DIR;
     }
     if (empty($_POST)) {
         if (!$this->exporterName) {
             $sql = "SELECT\tCOUNT(*) AS count\n\t\t\t\t\tFROM\twcf" . WCF_N . "_import_mapping";
             $statement = WCF::getDB()->prepareStatement($sql);
             $statement->execute();
             $row = $statement->fetchArray();
             if ($row['count']) {
                 $this->showMappingNotice = true;
             }
         }
     }
     $sql = "SHOW VARIABLES LIKE 'innodb_flush_log_at_trx_commit'";
     $statement = WCF::getDB()->prepareStatement($sql);
     $statement->execute();
     $row = $statement->fetchArray();
     if ($row && $row['Value'] == 1) {
         $this->showInnoDBWarning = true;
     }
 }
开发者ID:nick-strohm,项目名称:WCF,代码行数:28,代码来源:DataImportForm.class.php

示例10: readData

 /**
  * @see	\wcf\page\IPage::readData()
  */
 public function readData()
 {
     $objectTypes = ObjectTypeCache::getInstance()->getObjectTypes('com.woltlab.wcf.condition.ad');
     foreach ($objectTypes as $objectType) {
         if (!$objectType->conditionobject) {
             continue;
         }
         if (!isset($this->groupedConditionObjectTypes[$objectType->conditionobject])) {
             $this->groupedConditionObjectTypes[$objectType->conditionobject] = array();
         }
         if ($objectType->conditiongroup) {
             if (!isset($this->groupedConditionObjectTypes[$objectType->conditionobject][$objectType->conditiongroup])) {
                 $this->groupedConditionObjectTypes[$objectType->conditionobject][$objectType->conditiongroup] = array();
             }
             $this->groupedConditionObjectTypes[$objectType->conditionobject][$objectType->conditiongroup][$objectType->objectTypeID] = $objectType;
         } else {
             $this->groupedConditionObjectTypes[$objectType->conditionobject][$objectType->objectTypeID] = $objectType;
         }
     }
     $this->locations = AdHandler::getInstance()->getLocationSelection();
     foreach (AdHandler::getInstance()->getLocationObjectTypes() as $objectType) {
         $this->locationObjectTypes[$objectType->objectTypeID] = $objectType;
     }
     parent::readData();
 }
开发者ID:nick-strohm,项目名称:WCF,代码行数:28,代码来源:AdAddForm.class.php

示例11: readData

 /**
  * @see	\wcf\page\IPage::readData()
  */
 public function readData()
 {
     parent::readData();
     if (empty($_POST)) {
         // default values
         $contentLanguages = 0;
         foreach ($this->languages as $languageID => $language) {
             if ($language->hasContent) {
                 $contentLanguages++;
                 $this->languageIDs[] = $languageID;
             }
         }
         // add default language
         if (!in_array(LanguageFactory::getInstance()->getDefaultLanguageID(), $this->languageIDs)) {
             $this->languageIDs[] = LanguageFactory::getInstance()->getDefaultLanguageID();
         }
         if ($contentLanguages > 1) {
             $this->enable = 1;
         }
     }
 }
开发者ID:nick-strohm,项目名称:WCF,代码行数:24,代码来源:LanguageMultilingualismForm.class.php

示例12: readData

 /**
  * @see	\wcf\page\IPage::readData()
  */
 public function readData()
 {
     $this->labelGroupList = new LabelGroupList();
     $this->labelGroupList->sqlOrderBy = 'label_group.groupName';
     $this->labelGroupList->readObjects();
     parent::readData();
 }
开发者ID:nick-strohm,项目名称:WCF,代码行数:10,代码来源:LabelAddForm.class.php

示例13: readData

 /**
  * @see	\wcf\page\IPage::readData()
  */
 public function readData()
 {
     parent::readData();
     $categoryTree = new NewsPictureCategoryNodeTree('de.voolia.news.picture.category');
     $this->categoryList = $categoryTree->getIterator();
     $this->categoryList->setMaxDepth(0);
 }
开发者ID:joshuaruesweg,项目名称:de.voolia.news,代码行数:10,代码来源:NewsPictureAddForm.class.php

示例14: readData

 /**
  * @see	\wcf\page\IPage::readData()
  */
 public function readData()
 {
     parent::readData();
     if (empty($_POST)) {
         // read values of accessible user groups
         $conditions = new PreparedStatementConditionBuilder();
         $conditions->add("groupID IN (?)", array(array_keys($this->groups)));
         $conditions->add("optionID = ?", array($this->userGroupOption->optionID));
         $sql = "SELECT\tgroupID, optionValue\n\t\t\t\tFROM\twcf" . WCF_N . "_user_group_option_value\n\t\t\t\t" . $conditions;
         $statement = WCF::getDB()->prepareStatement($sql);
         $statement->execute($conditions->getParameters());
         while ($row = $statement->fetchArray()) {
             $this->values[$row['groupID']] = $row['optionValue'];
         }
     }
     // create form elements for each group
     foreach ($this->groups as $group) {
         $optionValue = isset($this->values[$group->groupID]) ? $this->values[$group->groupID] : '';
         $this->formElements[$group->groupID] = $this->optionType->getFormElement($this->userGroupOption, $optionValue);
     }
 }
开发者ID:nick-strohm,项目名称:WCF,代码行数:24,代码来源:UserGroupOptionForm.class.php

示例15: readData

 /**
  * @see	\wcf\page\IPage::readData()
  */
 public function readData()
 {
     parent::readData();
     if (empty($_POST)) {
         if ($this->subscription->subscriptionLength) {
             $d = DateUtil::getDateTimeByTimestamp(TIME_NOW);
             $d->add($this->subscription->getDateInterval());
             $this->endDate = $d->format('Y-m-d');
         }
     }
 }
开发者ID:nick-strohm,项目名称:WCF,代码行数:14,代码来源:PaidSubscriptionUserAddForm.class.php


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