本文整理匯總了PHP中module::get_obsolete_modules_message方法的典型用法代碼示例。如果您正苦於以下問題:PHP module::get_obsolete_modules_message方法的具體用法?PHP module::get_obsolete_modules_message怎麽用?PHP module::get_obsolete_modules_message使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類module
的用法示例。
在下文中一共展示了module::get_obsolete_modules_message方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: index
public function index()
{
$session = Session::instance();
// Make sure we have an upgrade token
if (!($upgrade_token = $session->get("upgrade_token", null))) {
$session->set("upgrade_token", $upgrade_token = random::hash());
}
// If the upgrade token exists, then bless this session
if (file_exists(TMPPATH . $upgrade_token)) {
$session->set("can_upgrade", true);
@unlink(TMPPATH . $upgrade_token);
}
$available_upgrades = 0;
foreach (module::available() as $module) {
if ($module->version && $module->version != $module->code_version) {
$available_upgrades++;
}
}
$failed = Input::instance()->get("failed");
$view = new View("upgrader.html");
$view->can_upgrade = identity::active_user()->admin || $session->get("can_upgrade");
$view->upgrade_token = $upgrade_token;
$view->available = module::available();
$view->failed = $failed ? explode(",", $failed) : array();
$view->done = $available_upgrades == 0;
$view->obsolete_modules_message = module::get_obsolete_modules_message();
print $view;
}
示例2: index
public function index()
{
$view = new Admin_View("admin.html");
$view->page_title = t("Dashboard");
$view->content = new View("admin_dashboard.html");
$view->content->blocks = block_manager::get_html("dashboard_center");
$view->sidebar = "<div id=\"g-admin-dashboard-sidebar\">" . block_manager::get_html("dashboard_sidebar") . "</div>";
$view->content->obsolete_modules_message = module::get_obsolete_modules_message();
print $view;
}
示例3: index
public function index()
{
// If modules need upgrading, this will get recreated in module::available()
site_status::clear("upgrade_now");
$view = new Admin_View("admin.html");
$view->page_title = t("Modules");
$view->content = new View("admin_modules.html");
$view->content->available = module::available();
$view->content->obsolete_modules_message = module::get_obsolete_modules_message();
print $view;
}