当前位置: 首页>>代码示例>>PHP>>正文


PHP Widgets::uninstall方法代码示例

本文整理汇总了PHP中Widgets::uninstall方法的典型用法代码示例。如果您正苦于以下问题:PHP Widgets::uninstall方法的具体用法?PHP Widgets::uninstall怎么用?PHP Widgets::uninstall使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Widgets的用法示例。


在下文中一共展示了Widgets::uninstall方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: uninstall

 /**
  * Uninstall a deactivated module.  This will call <module>_installer::uninstall() which should
  * take whatever steps necessary to make sure that all traces of a module are gone.
  * @param string $module_name
  */
 public static function uninstall($module_name)
 {
     //Call DB migrations for this module
     self::migrate($module_name, 'down');
     $installer_class = ucfirst($module_name) . '_Installer';
     if (is_callable(array($installer_class, "uninstall"))) {
         call_user_func(array($installer_class, "uninstall"));
     }
     $module = self::get($module_name);
     if ($module->loaded()) {
         $module->delete();
     }
     self::load_modules(TRUE);
     // remove widgets when the module is uninstalled
     Widgets::uninstall($module_name);
     Log::info('Uninstalled module :module_name', array(':module_name' => $module_name));
 }
开发者ID:ultimateprogramer,项目名称:cms,代码行数:22,代码来源:module.php

示例2: delete

 /**
  * The Delete action of the Admin module should be triggered through an HTTP POST request in order to
  * uninstall a widget that was installed in the widget repository.
  *
  * @param string $widget The identifier of the widget that must uninstalled from the widget repository.
  */
 public function delete($widget)
 {
     // Security check.
     if (!Auth::isAuth() && (Auth::isAdmin() || Auth::isGod())) {
         DefaultFC::redirection('users/index?ref=admin');
     }
     // Action
     Widgets::uninstall($widget);
     $_SESSION['isError'] = false;
     $_SESSION['message'] = __("The widget has been deleted successfully.");
     DefaultFC::redirection('admin/index');
 }
开发者ID:ripplecrpht,项目名称:ripplecrpht,代码行数:18,代码来源:Admin.class.php


注:本文中的Widgets::uninstall方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。