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


PHP WFEditorPlugin::getInstance方法代码示例

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


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

示例1: array

 public function &getAggregators()
 {
     static $aggregators;
     if (!isset($aggregators)) {
         $aggregators = array();
     }
     // get the aggregator format for this instance
     $format = $this->get('format');
     if (empty($aggregators[$format])) {
         jimport('joomla.filesystem.folder');
         // get a plugin instance
         $plugin = WFEditorPlugin::getInstance();
         $aggregators[$format] = array();
         $path = WF_EDITOR_EXTENSIONS . '/aggregator';
         $files = JFolder::files($path, '\\.php$', false, true);
         foreach ($files as $file) {
             require_once $file;
             $name = basename($file, '.php');
             $classname = 'WFAggregatorExtension_' . ucfirst($name);
             // only load if enabled
             if (class_exists($classname)) {
                 $aggregator = new $classname();
                 // check if enabled
                 if ($aggregator->isEnabled()) {
                     if ($aggregator->get('format') == $format) {
                         $aggregator->set('name', $name);
                         $aggregator->set('title', 'WF_AGGREGATOR_' . strtoupper($name) . '_TITLE');
                         $aggregators[$format][] = $aggregator;
                     }
                 }
             }
         }
     }
     return $aggregators[$format];
 }
开发者ID:DanyCan,项目名称:wisten.github.io,代码行数:35,代码来源:aggregator.php

示例2: getList

 function getList()
 {
     $wf =& WFEditorPlugin::getInstance();
     if ($wf->checkAccess('menu', '1')) {
         return '<li id="index.php?option=com_menu"><div class="tree-row"><div class="tree-image"></div><span class="folder menu nolink"><a href="javascript:;">' . JText::_('MENU') . '</a></span></div></li>';
     }
 }
开发者ID:neoandrew1000,项目名称:crao_journal,代码行数:7,代码来源:menu.php

示例3: getRootDir

 /**
  * Return the full user directory path. Create if required
  *
  * @param string	The base path
  * @access public
  * @return Full path to folder
  */
 function getRootDir()
 {
     static $root;
     if (!isset($root)) {
         $root = parent::getRootDir();
         $wf = WFEditorPlugin::getInstance();
         // Restricted Joomla! folders
         $restricted = explode(',', $wf->getParam('editor.filesystem.joomla.restrict_dir', 'administrator,cache,components,includes,language,libraries,logs,media,modules,plugins,templates,xmlrpc'));
         $allowroot = $wf->getParam('editor.filesystem.joomla.allow_root', 0);
         // Revert to default if empty
         if (empty($root) && !$allowroot) {
             $root = 'images';
         }
         // Force default if directory is a joomla directory
         $parts = explode('/', $root);
         if (in_array(strtolower($parts[0]), $restricted) && !$allowroot) {
             $root = 'images';
         }
         if (!empty($root)) {
             // Create the folder
             $full = WFUtility::makePath(JPATH_SITE, $root);
             if (!JFolder::exists($full)) {
                 $this->folderCreate($full);
             }
             // Fallback
             $root = JFolder::exists($full) ? $root : 'images';
         }
     }
     return $root;
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:37,代码来源:joomla.php

示例4: getList

 function getList()
 {
     $wf = WFEditorPlugin::getInstance();
     if ($wf->checkAccess('links.joomlalinks.menu', 1)) {
         return '<li id="index.php?option=com_menu"><div class="tree-row"><div class="tree-image"></div><span class="folder menu nolink"><a href="javascript:;">' . WFText::_('WF_LINKS_JOOMLALINKS_MENU') . '</a></span></div></li>';
     }
 }
开发者ID:srbsnkr,项目名称:sellingonlinemadesimple,代码行数:7,代码来源:menu.php

示例5: isEnabled

 function isEnabled()
 {
     $wf = WFEditorPlugin::getInstance();
     if (JPluginHelper::isEnabled('system', 'rokbox') && $wf->getParam('popups.rokbox.enable', 1) == 1) {
         return true;
     }
     return false;
 }
开发者ID:srbsnkr,项目名称:sellingonlinemadesimple,代码行数:8,代码来源:rokbox.php

示例6: isEnabled

 function isEnabled()
 {
     $plugin = WFEditorPlugin::getInstance();
     if ($plugin->getParam('popups.window.enable', 1) && ($plugin->getName() == 'link' || $plugin->getName() == 'imgmanager_ext')) {
         return true;
     }
     return false;
 }
开发者ID:omarmm,项目名称:MangLuoiBDS,代码行数:8,代码来源:window.php

示例7: isEnabled

 public function isEnabled()
 {
     $wf = WFEditorPlugin::getInstance();
     if (JPluginHelper::isEnabled('system', 'widgetkit_system') && $wf->getParam('popups.widgetkit.enable', 1) == 1) {
         return true;
     }
     return false;
 }
开发者ID:adjaika,项目名称:J3Base,代码行数:8,代码来源:widgetkit.php

示例8: isEnabled

 public function isEnabled()
 {
     $jce = WFEditorPlugin::getInstance();
     if (JPluginHelper::isEnabled('system', 'jcemediabox') && $jce->getParam('popups.jcemediabox.enable', 1) == 1) {
         return true;
     }
     return false;
 }
开发者ID:acculitx,项目名称:fleetmatrixsite,代码行数:8,代码来源:jcemediabox.php

示例9: getList

 public function getList()
 {
     //Reference to JConentEditor (JCE) instance
     $wf = WFEditorPlugin::getInstance();
     if ($wf->checkAccess('links.joomlalinks.contacts', 1)) {
         return '<li id="index.php?option=com_contact"><div class="tree-row"><div class="tree-image"></div><span class="folder contact nolink"><a href="javascript:;">' . WFText::_('WF_LINKS_JOOMLALINKS_CONTACTS') . '</a></span></div></li>';
     }
 }
开发者ID:acculitx,项目名称:fleetmatrixsite,代码行数:8,代码来源:contact.php

示例10: getList

 public function getList()
 {
     $advlink = WFEditorPlugin::getInstance();
     $list = '';
     if ($advlink->checkAccess('flexicontentlinks.items', '1')) {
         return '<li id="index.php?option=com_flexicontent_items&view=category&cid=1"><div class="tree-row"><div class="tree-image"></div><span class="folderflexicontent nolink"><a href="javascript:;">' . JText::_('FLEXIcontent') . '</a></span></div></li>';
     }
     return $list;
 }
开发者ID:jguilloux71,项目名称:crok-notes,代码行数:9,代码来源:items.php

示例11: getList

 public function getList()
 {
     $advlink = WFEditorPlugin::getInstance();
     $list = '';
     if ($advlink->checkAccess('JEventslinks.JEvents', '1')) {
         $list = '<li id="index.php?option=com_jevents"><div class="tree-row"><div class="tree-image"></div><span class="folder content nolink"><a href="javascript:;">' . JText::_('JEvents Content') . '</a></span></div></li>';
     }
     return $list;
 }
开发者ID:jguilloux71,项目名称:crok-notes,代码行数:9,代码来源:jevents.php

示例12: getRootDir

 /**
  * Return the full user directory path. Create if required
  *
  * @param string  The base path
  * @access public
  * @return Full path to folder
  */
 function getRootDir()
 {
     static $root;
     if (!isset($root)) {
         $user = JFactory::getUser();
         $wf = WFEditorPlugin::getInstance();
         $profile = $wf->getProfile();
         // Get base directory as shared parameter
         $root = $this->get('dir', '');
         // Remove whitespace
         $root = trim($root);
         if (!empty($root)) {
             // Convert slashes / Strip double slashes
             $root = preg_replace('/[\\\\]+/', '/', $root);
             // Remove first leading slash
             $root = ltrim($root, '/');
             // Force default directory if base param starts with a variable or a . eg $id
             if (preg_match('/[\\.\\$]/', $root[0])) {
                 $root = 'images';
             }
             jimport('joomla.user.helper');
             // Joomla! 1.6+
             if (method_exists('JUserHelper', 'getUserGroups')) {
                 $groups = JUserHelper::getUserGroups($user->id);
                 // get the first group
                 $group_id = array_shift(array_keys($groups));
                 // Joomla! 2.5?
                 if (is_int($group_id)) {
                     // usergroup table
                     $group = JTable::getInstance('Usergroup', 'JTable');
                     $group->load($group_id);
                     // usertype
                     $usertype = $group->title;
                 } else {
                     $usertype = $group_id;
                 }
             } else {
                 $usertype = $user->usertype;
             }
             // Replace any path variables
             $pattern = array('/\\$id/', '/\\$username/', '/\\$usertype/', '/\\$(group|profile)/', '/\\$day/', '/\\$month/', '/\\$year/');
             $replace = array($user->id, $user->username, $usertype, $profile->name, date('d'), date('m'), date('Y'));
             $root = preg_replace($pattern, $replace, $root);
             // split into path parts to preserve /
             $parts = explode('/', $root);
             // clean path parts
             $parts = WFUtility::makeSafe($parts, $wf->getParam('editor.websafe_mode', 'utf-8'), $wf->getParam('editor.websafe_allow_spaces', 0));
             //join path parts
             $root = implode('/', $parts);
         }
     }
     return $root;
 }
开发者ID:01J,项目名称:bealtine,代码行数:60,代码来源:filesystem.php

示例13: getLinks

 public function getLinks($args)
 {
     $wf = WFEditorPlugin::getInstance();
     $items = array();
     switch ($args->view) {
         // Get all WebLink categories
         default:
         case 'categories':
             $categories = WFLinkBrowser::getCategory('com_weblinks');
             foreach ($categories as $category) {
                 $itemid = WFLinkBrowser::getItemId('com_weblinks', array('categories' => null, 'category' => $category->id));
                 $items[] = array('id' => 'index.php?option=com_weblinks&view=category&id=' . $category->id . $itemid, 'name' => $category->title . ' / ' . $category->alias, 'class' => 'folder weblink');
             }
             break;
             // Get all links in the category
         // Get all links in the category
         case 'category':
             require_once JPATH_SITE . DS . 'includes' . DS . 'application.php';
             require_once JPATH_SITE . DS . 'components' . DS . 'com_weblinks' . DS . 'helpers' . DS . 'route.php';
             if (!WF_JOOMLA15) {
                 $categories = WFLinkBrowser::getCategory('com_weblinks', $args->id);
                 if (count($categories)) {
                     foreach ($categories as $category) {
                         $children = WFLinkBrowser::getCategory('com_weblinks', $category->id);
                         if ($children) {
                             $id = 'index.php?option=com_weblinks&view=category&id=' . $category->id;
                         } else {
                             $itemid = WFLinkBrowser::getItemId('com_weblinks', array('categories' => null, 'category' => $category->slug));
                             $id = 'index.php?option=com_weblinks&view=category&id=' . $category->slug . $itemid;
                         }
                         $items[] = array('id' => $id, 'name' => $category->title . ' / ' . $category->alias, 'class' => 'folder weblink');
                     }
                 }
             }
             $weblinks = self::_weblinks($args->id);
             foreach ($weblinks as $weblink) {
                 $items[] = array('id' => WeblinksHelperRoute::getWeblinkRoute($weblink->id, $args->id), 'name' => $weblink->title . ' / ' . $weblink->alias, 'class' => 'file');
             }
             break;
     }
     return $items;
 }
开发者ID:andreassetiawanhartanto,项目名称:PDKKI,代码行数:42,代码来源:weblinks.php

示例14: getLinks

 function getLinks($args)
 {
     global $_DOCMAN, $mainframe;
     $wf = WFEditorPlugin::getInstance();
     jimport('joomla.filesystem.file');
     require_once JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_docman' . DS . 'docman.class.php';
     //DOCMan core interaction API
     $_DOCMAN = new dmMainFrame(_DM_TYPE_DOCLINK);
     // Load classes and language
     require_once $_DOCMAN->getPath('classes', 'utils');
     $cid = isset($args->gid) ? $args->gid : 0;
     //get folders
     $categories = DOCMAN_Cats::getChildsByUserAccess($cid);
     $items = array();
     $view = isset($args->view) ? $args->view : '';
     switch ($view) {
         default:
             foreach ($categories as $category) {
                 $items[] = array('id' => 'index.php?option=com_docman&view=category&gid=' . $category->id . WFLinkBrowser::getItemId('com_docman'), 'name' => $category->name, 'class' => 'folder docmanlinks');
             }
             break;
         case 'category':
             //get items
             if ($cid) {
                 $categories = DOCMAN_Cats::getChildsByUserAccess($cid);
                 $documents = DOCMAN_Docs::getDocsByUserAccess($cid, 'name', 'ASC', 999, 0);
             } else {
                 $categories = array();
                 $documents = array();
             }
             foreach ($categories as $category) {
                 $items[] = array('id' => 'index.php?option=com_docman&view=category&gid=' . $category->id . WFLinkBrowser::getItemId('com_docman'), 'name' => $category->name, 'class' => 'folder docmanlinks');
             }
             foreach ($documents as $document) {
                 $items[] = array('id' => 'index.php?option=com_docman&task=doc_' . $wf->getParam('docmanlinks_link', 'download') . '&gid=' . $document->id . WFLinkBrowser::getItemId('com_docman'), 'name' => $document->dmname, 'class' => 'file docmanlinks ' . JFile::getExt($document->dmfilename));
             }
             break;
     }
     return $items;
 }
开发者ID:jguilloux71,项目名称:crok-notes,代码行数:40,代码来源:docman.php

示例15: getRootDir

 /**
  * Return the full user directory path. Create if required
  *
  * @param string  The base path
  * @access public
  * @return Full path to folder
  */
 function getRootDir()
 {
     static $root;
     if (!$root) {
         $user = JFactory::getUser();
         $wf = WFEditorPlugin::getInstance();
         $profile = $wf->getProfile();
         // Get base directory as shared parameter
         $root = $this->get('dir', 'images');
         // Remove whitespace
         $root = trim($root);
         // Convert slashes / Strip double slashes
         $root = preg_replace('/[\\\\]+/', '/', $root);
         // Remove first leading slash
         $root = ltrim($root, '/');
         // Force default directory if base param starts with a variable or a . eg $id
         if (preg_match('/[\\.\\$]/', $root[0])) {
             $root = 'images';
         }
         jimport('joomla.user.helper');
         // Joomla! 1.6+
         if (method_exists('JUserHelper', 'getUserGroups')) {
             $groups = JUserHelper::getUserGroups($user->id);
             $usertype = array_shift(array_keys($groups));
         } else {
             $usertype = $user->usertype;
         }
         // Replace any path variables
         $pattern = array('/\\$id/', '/\\$username/', '/\\$usertype/', '/\\$(group|profile)/', '/\\$day/', '/\\$month/', '/\\$year/');
         $replace = array($user->id, strtolower($user->username), strtolower($usertype), strtolower($profile->name), date('d'), date('m'), date('Y'));
         $root = preg_replace($pattern, $replace, $root);
         // Clean
         $root = preg_replace(array('/$\\w+\\b/', '/(\\.) {2,}/', '/[^A-Za-z0-9:\\.\\_\\-\\/]/'), '', $root);
     }
     return $root;
 }
开发者ID:andreassetiawanhartanto,项目名称:PDKKI,代码行数:43,代码来源:filesystem.php


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