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