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


PHP ilPlugin::createPluginRecord方法代碼示例

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


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

示例1: getPluginsInformation

 /**
  * Get information an all plugins and their status.
  */
 function getPluginsInformation()
 {
     global $ilPluginAdmin;
     // read plugins directory
     $pl_dir = $this->getPluginsDirectory();
     if (!@is_dir($pl_dir)) {
         return array();
     }
     $dir = opendir($pl_dir);
     $plugins = array();
     while ($file = readdir($dir)) {
         if ($file != "." and $file != "..") {
             // directories
             if (@is_dir($pl_dir . "/" . $file) && substr($file, 0, 1) != "." && is_file($pl_dir . "/" . $file . "/plugin.php")) {
                 $plugin = array();
                 $plugin = ilPlugin::lookupStoredData($this->getComponentType(), $this->getComponentName(), $this->getSlotId(), $file);
                 // create record in il_plugin table (if not existing)
                 ilPlugin::createPluginRecord($this->getComponentType(), $this->getComponentName(), $this->getSlotId(), $file);
                 $pdata = $ilPluginAdmin->getAllData($this->getComponentType(), $this->getComponentName(), $this->getSlotId(), $file);
                 $plugin["version"] = $pdata["version"];
                 $plugin["id"] = $pdata["id"];
                 $plugin["is_active"] = $pdata["is_active"];
                 $plugin["inactive_reason"] = $pdata["inactive_reason"];
                 $plugin["needs_update"] = $pdata["needs_update"];
                 $plugin["ilias_min_version"] = $pdata["ilias_min_version"];
                 $plugin["ilias_max_version"] = $pdata["ilias_max_version"];
                 $plugin["activation_possible"] = $pdata["activation_possible"];
                 $plugin["responsible"] = $pdata["responsible"];
                 $plugin["responsible_mail"] = $pdata["responsible_mail"];
                 $plugin["name"] = $file;
                 $plugin["plugin_php_file_status"] = $this->checkPluginPhpFileAvailability($file);
                 $plugin["class_file_status"] = $this->checkClassFileAvailability($file);
                 $plugin["class_file"] = "class.il" . $plugin["name"] . "Plugin.php";
                 $plugins[] = $plugin;
             }
         }
     }
     return $plugins;
 }
開發者ID:arlendotcn,項目名稱:ilias,代碼行數:42,代碼來源:class.ilPluginSlot.php


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