本文整理匯總了PHP中Editor::m_pageid方法的典型用法代碼示例。如果您正苦於以下問題:PHP Editor::m_pageid方法的具體用法?PHP Editor::m_pageid怎麽用?PHP Editor::m_pageid使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Editor
的用法示例。
在下文中一共展示了Editor::m_pageid方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: GetPage
public static function GetPage($a_id)
{
self::$m_pageid = $a_id;
$result = Database::Query("SELECT * FROM `" . DB_TBL_PAGES . "` WHERE `id` = '" . Database::Escape($a_id) . "'");
if (!$result->HasData()) {
die("Page with id #" . $a_id . " not found!");
}
Content::$m_pagename = unserialize($result->GetValue('name'));
$compiler = new Compiler();
$doc = $compiler->CompilePage(self::$m_pageid, COMPILER_MODE_EDITOR);
// Plugin Hook
$data_object = new stdClass();
$data_object->doc = $doc;
ObjMgr::GetPluginMgr()->ExecuteHook("On_PrepareTemplate", $data_object);
//Content::ProcessStrings($doc);
// Add neccessary data
$locale_list = array();
foreach (Locales::$m_locales as $locale) {
$loc_data = array();
$loc_data['name'] = $locale;
$loc_data['ico'] = Locales::GetConstString('ICO', $locale);
$locale_list[] = $loc_data;
}
self::AddData(DATA_LOCALES, array('default' => Locales::$m_locale, 'list' => $locale_list));
self::AddData(DATA_STRINGS, Locales::$m_const_strings[Locales::$m_locale]);
self::GeneratePageData();
self::GenerateModulesData();
self::InsertHeadContent($doc);
self::GenerateToolBar($doc);
// Title
Content::AddTitle($doc, Locales::GetConstString("PAGE_TITLE", NULL, Content::$m_pagename[Locales::$m_locale]));
return $doc->getHtml();
}