當前位置: 首頁>>代碼示例>>PHP>>正文


PHP core_plugin_manager::get_installed_plugins方法代碼示例

本文整理匯總了PHP中core_plugin_manager::get_installed_plugins方法的典型用法代碼示例。如果您正苦於以下問題:PHP core_plugin_manager::get_installed_plugins方法的具體用法?PHP core_plugin_manager::get_installed_plugins怎麽用?PHP core_plugin_manager::get_installed_plugins使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在core_plugin_manager的用法示例。


在下文中一共展示了core_plugin_manager::get_installed_plugins方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: get_plugins

 /**
  * Gathers and returns the information about all plugins of the given type,
  * either on disk or previously installed.
  *
  * @param string $type the name of the plugintype, eg. mod, auth or workshopform
  * @param string $typerootdir full path to the location of the plugin dir
  * @param string $typeclass the name of the actually called class
  * @param core_plugin_manager $pluginman the plugin manager calling this method
  * @return array of plugintype classes, indexed by the plugin name
  */
 public static function get_plugins($type, $typerootdir, $typeclass, $pluginman)
 {
     $return = array();
     $plugins = $pluginman->get_installed_plugins($type);
     foreach ($plugins as $name => $version) {
         $plugin = new $typeclass();
         $plugin->type = $type;
         $plugin->typerootdir = $typerootdir;
         $plugin->name = $name;
         $plugin->rootdir = null;
         $plugin->displayname = $name;
         $plugin->versiondb = $version;
         $plugin->pluginman = $pluginman;
         $plugin->init_is_standard();
         $return[$name] = $plugin;
     }
     return $return;
 }
開發者ID:evltuma,項目名稱:moodle,代碼行數:28,代碼來源:orphaned.php


注:本文中的core_plugin_manager::get_installed_plugins方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。