本文整理汇总了PHP中FSS_Helper::IsPluignEnabled方法的典型用法代码示例。如果您正苦于以下问题:PHP FSS_Helper::IsPluignEnabled方法的具体用法?PHP FSS_Helper::IsPluignEnabled怎么用?PHP FSS_Helper::IsPluignEnabled使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FSS_Helper
的用法示例。
在下文中一共展示了FSS_Helper::IsPluignEnabled方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getPrintList
static function getPrintList($for_admin, $ticket)
{
$result = array();
$path = JPATH_SITE . DS . 'components' . DS . 'com_fss' . DS . 'plugins' . DS . 'ticketprint';
$files = JFolder::files($path, ".xml\$");
foreach ($files as $file) {
$id = pathinfo($file, PATHINFO_FILENAME);
if (!FSS_Helper::IsPluignEnabled("ticketprint", $id)) {
continue;
}
$xml = simplexml_load_file($path . DS . $file);
if ($for_admin && (int) $xml->admin != 1) {
continue;
}
if (!$for_admin && (int) $xml->user != 1) {
continue;
}
if ($xml->can_run_php) {
$fn = create_function('$for_admin,$ticket', (string) $xml->can_run_php);
if (!$fn($for_admin, $ticket)) {
continue;
}
}
$result[str_ireplace(".xml", "", $file)] = (string) $xml->title;
}
return $result;
}
示例2: LoadPlugins
static function LoadPlugins($also_disabled = false)
{
// load in all php files in components/com_fss/plugins/tickets and for each make a new object
if (empty(self::$plugins)) {
self::$plugins = array();
$path = JPATH_SITE . DS . 'components' . DS . 'com_fss' . DS . 'plugins' . DS . 'tickets';
$files = JFolder::files($path, ".php\$");
foreach ($files as $file) {
$fullpath = $path . DS . $file;
$info = pathinfo($fullpath);
if (!FSS_Helper::IsPluignEnabled("tickets", $info['filename'])) {
continue;
}
$ext = $info['extension'];
$classname = "SupportActions" . $info['filename'];
require_once $fullpath;
if (class_exists($classname)) {
$plugin = new $classname();
$plugin->enabled = true;
$plugin->php_file = $fullpath;
$plugin->id = $info['filename'];
self::$plugins[] = $plugin;
}
}
}
return self::$plugins;
}
示例3: load
static function load()
{
if (self::$loaded) {
return;
}
$path = JPATH_SITE . DS . "components" . DS . "com_fss" . DS . "plugins" . DS . "gui" . DS;
$files = JFolder::files($path, ".php\$");
foreach ($files as $file) {
$id = pathinfo($file, PATHINFO_FILENAME);
if (!FSS_Helper::IsPluignEnabled("gui", $id)) {
continue;
}
$class = "FSS_GUIPlugin_" . $id;
require_once $path . DS . $file;
if (class_exists($class)) {
self::$plugins[$id] = new $class();
self::$plugins[$id]->id = $id;
}
}
self::$loaded = true;
}
示例4: load_plugins
private function load_plugins()
{
if (empty($this->plugins)) {
$this->plugins = array();
$path = JPATH_SITE . DS . "components" . DS . "com_fss" . DS . "plugins" . DS . "userlist" . DS;
$files = JFolder::files($path, ".php\$");
foreach ($files as $file) {
$id = pathinfo($file, PATHINFO_FILENAME);
if (!FSS_Helper::IsPluignEnabled("userlist", $id)) {
continue;
}
$class = "User_List_" . $id;
require_once $path . DS . $file;
if (class_exists($class)) {
$this->plugins[$id] = new $class();
$this->plugins[$id]->id = $id;
}
}
}
return $this->plugins;
}