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


PHP PluginManager::getPlugins方法代码示例

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


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

示例1: getArray

 function getArray($pSearch)
 {
     $pSearch = trim($pSearch);
     $array;
     $pluginManager = new PluginManager();
     $pluginArray = json_decode($pluginManager->getPlugins());
     $pluginArray = $pluginManager->getPluginTags();
     foreach ($pluginArray as $plugin) {
         $name = $plugin['name'];
         if (!empty($plugin['icon'])) {
             $icon = $plugin['icon'];
         } else {
             $icon = 'images/th-small.png';
         }
         $id = $plugin['id'];
         if ($this->isIn($pSearch, $name)) {
             $array[] = array("title" => $name, "icon" => $icon, "click" => "openPlugin('{$id}','','')");
         }
         if (!empty($plugin['tags'])) {
             $tags = $plugin['tags'];
             foreach ($tags as $tag) {
                 if (is_array($tag) && count($tag) == 2 && count($tag[1]) == 2) {
                     if ($this->isIn($pSearch, $tag[0])) {
                         $description = $name . ' - ' . $tag[0];
                         $array[] = array("title" => $description, "icon" => $icon, "click" => "openPlugin('{$id}','" . $tag[1][0] . "','" . $tag[1][1] . "')");
                     }
                 } else {
                     if ($this->isIn($pSearch, $tag)) {
                         $description = $name . ' - ' . $tag;
                         $array[] = array("title" => $description, "icon" => $icon, "click" => "openPlugin('{$id}','','')");
                     }
                 }
             }
         }
     }
     if (!empty($array)) {
         return $array;
     }
     return null;
 }
开发者ID:michaelsoftware1997,项目名称:vision-server,代码行数:40,代码来源:SearchManager.php

示例2: assignCategoryControllers

 function assignCategoryControllers($tpl)
 {
     $action = isset($_REQUEST["a"]) ? $_REQUEST["a"] : "list";
     if ($action == "list") {
         $sth = $this->pdo->prepare("SELECT id, name, alarm_count, enabled FROM controllers");
         $sth->execute();
         $res = $sth->fetchAll();
         $tpl->assign('controllers_data', $res);
         $tpl->assign('view', 'view_dashboard_controllers');
     } else {
         if ($action == "add") {
             $item = array("id" => -1, "name" => "", "descr" => "", "enabled" => 1, "strict" => 0, "control_type" => "", "control_code" => "", "alarm_id" => 1);
             // Request for alarms
             $sth = $this->pdo->prepare("SELECT id, name FROM alarms");
             $sth->execute();
             $alarms = $sth->fetchAll();
             // Request for controls
             $pm = new PluginManager(PluginManager::PLUGIN_TYPE_CONTROL);
             $plugins = $pm->getPlugins();
             // Request current control
             $key = array_keys($plugins);
             $key = $key[0];
             $plugin = $plugins[$key];
             $ffh = new FieldFormHelper();
             $ffh->putFields($plugin->loadForm());
             $subformHtml = $ffh->getHTML();
             $tpl->assign('action', $action);
             $tpl->assign('item', $item);
             $tpl->assign('alarms_data', $alarms);
             $tpl->assign('controls_data', $plugins);
             $tpl->assign('subform_html', $subformHtml);
             $tpl->assign('view', 'view_dashboard_controllers_form');
         } else {
             if ($action == "edit") {
                 $sth = $this->pdo->prepare("SELECT id, name, descr, enabled, strict, control_type, control_code, alarm_id FROM controllers WHERE id = ?");
                 $sth->execute(array($_REQUEST["id"]));
                 $res = $sth->fetch(PDO::FETCH_ASSOC);
                 $item = $res;
                 // Request for alarms
                 $sth = $this->pdo->prepare("SELECT id, name FROM alarms");
                 $sth->execute();
                 $alarms = $sth->fetchAll();
                 // Request for controls
                 $pm = new PluginManager(PluginManager::PLUGIN_TYPE_CONTROL);
                 $plugins = $pm->getPlugins();
                 // Request current control
                 $plugin = $pm->getPlugin($item["control_type"]);
                 $plugin->loadConfig($item["control_code"]);
                 $ffh = new FieldFormHelper();
                 $ffh->putFields($plugin->loadForm());
                 $subformHtml = $ffh->getHTML();
                 $tpl->assign('action', $action);
                 $tpl->assign('item', $item);
                 $tpl->assign('alarms_data', $alarms);
                 $tpl->assign('controls_data', $plugins);
                 $tpl->assign('subform_html', $subformHtml);
                 $tpl->assign('view', 'view_dashboard_controllers_form');
             }
         }
     }
 }
开发者ID:yashodhank,项目名称:Monitoring,代码行数:61,代码来源:dashboard.php

示例3: getUrl

 function getUrl($idConference, $room_type)
 {
     $conference = $this->roomInfo($idConference);
     $plugin_conference = $this->PluginConferenceAdm->getElement($room_type, "code");
     $classname = PluginManager::getPlugins($plugin_conference['name']);
     $classconference = new $classname();
     $url = $classconference->getUrl($idConference, $room_type);
     return $url;
 }
开发者ID:abhinay100,项目名称:forma_app,代码行数:9,代码来源:lib.conference.1.3.plugins.php

示例4: dirname

<?php

header('Content-Type: application/json');
require dirname(dirname(__FILE__)) . '/includes/PluginManager.php';
require dirname(dirname(__FILE__)) . '/includes/LoginManager.php';
$pluginManager = new PluginManager();
echo $pluginManager->getPlugins();
开发者ID:michaelsoftware1997,项目名称:vision-server,代码行数:7,代码来源:plugins.php


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