本文整理匯總了PHP中Editor::m_moduleid方法的典型用法代碼示例。如果您正苦於以下問題:PHP Editor::m_moduleid方法的具體用法?PHP Editor::m_moduleid怎麽用?PHP Editor::m_moduleid使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Editor
的用法示例。
在下文中一共展示了Editor::m_moduleid方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: SaveModule
public static function SaveModule($a_data)
{
//print_r($_POST);
self::$m_pageid = Database::Escape($_POST['page_id']);
self::$m_moduleid = Database::Escape($_POST['module_id']);
// Delete old data
Database::Query("DELETE FROM `" . DB_TBL_DATA . "` WHERE `moduleid` = '" . self::$m_moduleid . "'");
self::SaveModuleFragment($a_data, self::$m_moduleid);
$module = new Module(self::$m_moduleid);
$doc = $module->Build();
// Plugin Hook
$data_object = new stdClass();
$data_object->doc = $doc;
ObjMgr::GetPluginMgr()->ExecuteHook("On_PrepareTemplate", $data_object);
print json_encode(array("moduleid" => self::$m_moduleid, "content" => $doc->getHtml(), "module_data" => self::$m_data['module_data']));
// Page needs recompiling
$result = Database::Query("SELECT `pageid` FROM `" . DB_TBL_MODULE . "` WHERE `id` = '" . self::$m_moduleid . "' GROUP BY `pageid`");
if ($result->HasData()) {
do {
Database::Query("UPDATE `" . DB_TBL_PAGES . "` SET `compiled` = '' WHERE `id` = '" . $result->GetValue('pageid') . "'");
} while ($result->NextRow());
}
}