本文整理匯總了PHP中ListPage::createListPage方法的典型用法代碼示例。如果您正苦於以下問題:PHP ListPage::createListPage方法的具體用法?PHP ListPage::createListPage怎麽用?PHP ListPage::createListPage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ListPage
的用法示例。
在下文中一共展示了ListPage::createListPage方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: array
$rtl = $xt->getReadingOrder() == 'RTL' ? 'RTL' : '';
$xt->cssFiles[] = array("stylepath" => "styles/" . $layout->style . '/style' . $rtl . ".css", "pagestylepath" => "pagestyles/" . $layout->name . $rtl . ".css");
$xt->IEcssFiles[] = array("stylepathIE" => "styles/" . $layout->style . '/styleIE' . ".css");
}
$options['xt'] = new Xtempl();
$options['id'] = $dpParams['ids'][$d];
$options['flyId'] = $flyId++;
$mkr = 1;
foreach ($mKeys[$strTableName] as $mk) {
if ($defvalues[$mk]) {
$options['masterKeysReq'][$mkr++] = $defvalues[$mk];
} else {
$options['masterKeysReq'][$mkr++] = '';
}
}
$listPageObject = ListPage::createListPage($strTableName, $options);
// prepare code
$listPageObject->prepareForBuildPage();
$flyId = $listPageObject->recId + 1;
//set page events
foreach ($listPageObject->eventsObject->events as $event => $name) {
$listPageObject->xt->assign_event($event, $listPageObject->eventsObject, $event, array());
}
//add detail settings to master settings
$listPageObject->addControlsJSAndCSS();
$listPageObject->fillSetCntrlMaps();
$pageObject->jsSettings['tableSettings'][$strTableName] = $listPageObject->jsSettings['tableSettings'][$strTableName];
$dControlsMap[$strTableName] = $listPageObject->controlsMap;
$dViewControlsMap[$strTableName] = $listPageObject->viewControlsMap;
foreach ($listPageObject->jsSettings["global"]["shortTNames"] as $tName => $shortTName) {
$pageObject->settingsMap["globalSettings"]["shortTNames"][$tName] = $shortTName;
示例2: setDetailList
/**
* @param String listTName
* @param Number listId
* @param &Array data
*/
protected function setDetailList($listTName, $listId, &$data)
{
include_once getabspath('classes/listpage.php');
include_once getabspath('classes/listpage_embed.php');
include_once getabspath('classes/listpage_dpinline.php');
//array of params for classes
$options = array();
$options["id"] = $listId;
$options["firstTime"] = 1;
$options["mode"] = LIST_DETAILS;
$options["pageType"] = PAGE_LIST;
$options["masterTable"] = $this->tName;
$options["masterPageType"] = $this->pageType;
$options["mainMasterPageType"] = $this->pageType;
$options["xt"] = new Xtempl(true);
//#9607 1. Temporary fix
$options["flyId"] = $this->genId() + 1;
$options["masterKeysReq"] = array();
$mkr = 1;
$mKeys = $this->pSet->getMasterKeysByDetailTable($listTName);
$masterKeys = array();
//for PAGE_EDIT only
foreach ($mKeys as $mk) {
$options["masterKeysReq"][$mkr] = $data[$mk];
$masterKeys["masterKey" . $mkr] = $data[$mk];
$mkr++;
}
$listPageObject = ListPage::createListPage($listTName, $options);
$listPageObject->prepareForBuildPage();
if ($listPageObject->isDispGrid()) {
//set page events
foreach ($listPageObject->eventsObject->events as $event => $name) {
$listPageObject->xt->assign_event($event, $listPageObject->eventsObject, $event, array());
}
//add detail settings to master settings
$listPageObject->addControlsJSAndCSS();
$listPageObject->fillSetCntrlMaps();
$this->copyDetailPreviewJSAndCSS($listPageObject);
$this->assignDisplayDetailTableXtVariable($listPageObject);
$this->updateSettingsWidthDPData($listPageObject);
$this->viewControlsMap["dViewControlsMap"][$listTName] = $listPageObject->viewControlsMap;
$this->controlsMap["dControlsMap"][$listTName] = $listPageObject->controlsMap;
if ($this->pageType == PAGE_EDIT) {
$this->controlsMap["dControlsMap"]["masterKeys"] = $masterKeys;
}
$this->controlsMap["dpTablesParams"][] = array("tName" => $listTName, "id" => $options["id"], "pType" => PAGE_LIST);
}
$this->flyId = $listPageObject->recId + 1;
}