本文整理汇总了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();
}
示例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();
}
示例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();
}
示例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();
}
示例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);
}
}
}
示例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();
}
示例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;
}
}
}
示例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();
}
示例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;
}
}
示例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();
}
示例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;
}
}
}
示例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();
}
示例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);
}
示例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);
}
}
示例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');
}
}
}