本文整理汇总了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;
}