本文整理汇总了PHP中Templates::displayPage方法的典型用法代码示例。如果您正苦于以下问题:PHP Templates::displayPage方法的具体用法?PHP Templates::displayPage怎么用?PHP Templates::displayPage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Templates
的用法示例。
在下文中一共展示了Templates::displayPage方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
// used in the settings page
$pageParams["allCountryPlugins"] = Core::$countryPlugins;
$pageParams["allExportTypes"] = $exportTypes;
$pageParams["groupedDataTypes"] = Core::$dataTypePlugins;
$pageParams["allDataTypes"] = $dataTypes;
$pageParams["allTranslations"] = Core::$translations->getList();
$useMinifiedResources = Core::isUsingMinifiedResources();
$pageParams["useMinifiedResources"] = $useMinifiedResources;
if ($useMinifiedResources) {
$pageParams["minifiedResourcePaths"] = Minification::getMinifiedResourcePaths();
}
$pageParams["dataTypeJSModules"] = $dataTypeJSModules;
$pageParams["exportTypeJSModules"] = $exportTypeJSModules;
$pageParams["exportTypeAdditionalSettings"] = $exportTypeAdditionalSettings;
$pageParams["settings"] = $settings;
$pageParams["cssIncludes"] = $cssIncludes;
$pageParams["codeMirrorIncludes"] = ExportTypePluginHelper::getExportTypeCodeMirrorModes($exportTypes);
$pageParams["defaultExportType"] = Core::$user->getDefaultExportType();
$pageParams["defaultNumRows"] = Core::getDefaultNumRows();
if (Core::checkIsLoggedIn()) {
$pageParams["isLoggedIn"] = true;
$pageParams["accountType"] = Core::$user->getAccountType();
$pageParams["selectedDataTypes"] = Core::$user->getSelectedDataTypes();
$pageParams["selectedExportTypes"] = Core::$user->getSelectedExportTypes();
$pageParams["selectedCountries"] = Core::$user->getSelectedCountries();
} else {
$pageParams["isLoggedIn"] = false;
$pageParams["accountType"] = "";
}
Templates::displayPage("resources/templates/index.tpl", $pageParams);
示例2: header
<?php
require_once "library.php";
Core::init();
// if need be, redirect to the install instructions page
Utils::maybeShowInstallationPage();
if (Core::checkIsLoggedIn()) {
header("location: ./");
exit;
}
$pageParams = array();
Templates::displayPage("resources/templates/login.tpl", $pageParams);
示例3: header
<?php
require_once "library.php";
Core::init("installation");
// if the script is already installed, redirect them to the index page.
if (Core::checkIsInstalled()) {
header("location: index.php");
exit;
}
$currentPage = 1;
if (Core::checkSettingsFileExists()) {
$currentPage = 3;
if (Settings::getSetting("installationStepComplete_Core") == "yes") {
$currentPage = 4;
}
}
$params = array();
$params["theme"] = Core::getDefaultTheme();
$params["randomPassword"] = Utils::generateRandomAlphanumericStr("CVxxCxV");
$params["tablePrefix"] = Core::getDbTablePrefix();
$params["currentPage"] = $currentPage;
Templates::displayPage("resources/templates/install.tpl", $params);
示例4: evalSmartyTemplate
/**
* Helper function for use by any of the modules (or Core). It lets
* @param string $template the template (.tpl file) and path from the Generate Data root.
* @param array $placeholders
* @return string
*/
public static function evalSmartyTemplate($template, $placeholders)
{
return Templates::displayPage($template, $placeholders, "return");
}