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


PHP nnParameters::getInstance方法代码示例

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


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

示例1: getInput

 protected function getInput()
 {
     if (!nnFrameworkFunctions::extensionInstalled('mijoshop')) {
         return '<fieldset class="alert alert-danger">' . JText::_('ERROR') . ': ' . JText::sprintf('NN_FILES_NOT_FOUND', JText::_('NN_MIJOSHOP')) . '</fieldset>';
     }
     $this->params = $this->element->attributes();
     $this->db = JFactory::getDBO();
     $group = $this->get('group', 'categories');
     $tables = $this->db->getTableList();
     if (!in_array($this->db->getPrefix() . 'mijoshop_' . ($group == 'products' ? 'product' : 'category'), $tables)) {
         return '<fieldset class="alert alert-danger">' . JText::_('ERROR') . ': ' . JText::sprintf('NN_TABLE_NOT_FOUND', JText::_('NN_MIJOSHOP')) . '</fieldset>';
     }
     $parameters = nnParameters::getInstance();
     $params = $parameters->getPluginParams('nnframework');
     $this->max_list_count = $params->max_list_count;
     if (!class_exists('MijoShop')) {
         require_once JPATH_ROOT . '/components/com_mijoshop/mijoshop/mijoshop.php';
     }
     $this->store_id = (int) MijoShop::get('opencart')->get('config')->get('config_store_id');
     $this->language_id = (int) MijoShop::get('opencart')->get('config')->get('config_language_id');
     if (!is_array($this->value)) {
         $this->value = explode(',', $this->value);
     }
     $options = $this->{'get' . $group}();
     $size = (int) $this->get('size');
     $multiple = $this->get('multiple');
     require_once JPATH_PLUGINS . '/system/nnframework/helpers/html.php';
     switch ($group) {
         case 'categories':
             return nnHtml::selectlist($options, $this->name, $this->value, $this->id, $size, $multiple);
         default:
             return nnHtml::selectlistsimple($options, $this->name, $this->value, $this->id, $size, $multiple);
     }
 }
开发者ID:A-Bush,项目名称:pprod,代码行数:34,代码来源:mijoshop.php

示例2: getInput

 protected function getInput()
 {
     if (!nnFrameworkFunctions::extensionInstalled('virtuemart')) {
         return '<fieldset class="alert alert-danger">' . JText::_('ERROR') . ': ' . JText::sprintf('NN_FILES_NOT_FOUND', JText::_('NN_VIRTUEMART')) . '</fieldset>';
     }
     $this->params = $this->element->attributes();
     $this->db = JFactory::getDBO();
     $group = $this->get('group', 'categories');
     $tables = $this->db->getTableList();
     if (!in_array($this->db->getPrefix() . 'virtuemart_' . $group, $tables)) {
         return '<fieldset class="alert alert-danger">' . JText::_('ERROR') . ': ' . JText::sprintf('NN_TABLE_NOT_FOUND', JText::_('NN_VIRTUEMART')) . '</fieldset>';
     }
     $parameters = nnParameters::getInstance();
     $params = $parameters->getPluginParams('nnframework');
     $this->max_list_count = $params->max_list_count;
     if (!is_array($this->value)) {
         $this->value = explode(',', $this->value);
     }
     $options = $this->{'get' . $group}();
     $size = (int) $this->get('size');
     $multiple = $this->get('multiple');
     if ($group == 'categories') {
         require_once JPATH_PLUGINS . '/system/nnframework/helpers/html.php';
         return nnHtml::selectlist($options, $this->name, $this->value, $this->id, $size, $multiple);
     }
     $size = $size ? 'style="width:' . $size . 'px"' : '';
     $attr = $size;
     $attr .= $multiple ? ' multiple="multiple"' : '';
     return JHtml::_('select.genericlist', $options, $this->name, trim($attr), 'value', 'text', $this->value, $this->id);
 }
开发者ID:educakanchay,项目名称:kanchay,代码行数:30,代码来源:virtuemart.php

示例3: getHelper

 /**
  * Create the helper object
  *
  * @return object The plugins helper object
  */
 private function getHelper()
 {
     // Already initialized, so return
     if ($this->_init) {
         return $this->_helper;
     }
     $this->_init = true;
     if (!$this->isFrameworkEnabled()) {
         return false;
     }
     if (!JFile::exists(JPATH_ADMINISTRATOR . '/components/com_snippets/models/list.php')) {
         return;
     }
     require_once JPATH_PLUGINS . '/system/nnframework/helpers/protect.php';
     if (nnProtect::isAdmin()) {
         return false;
     }
     if (nnProtect::isProtectedPage($this->_alias, 1)) {
         return false;
     }
     // Load component parameters
     require_once JPATH_PLUGINS . '/system/nnframework/helpers/parameters.php';
     $params = nnParameters::getInstance()->getComponentParams($this->_name);
     require_once JPATH_PLUGINS . '/system/nnframework/helpers/helper.php';
     $this->_helper = nnFrameworkHelper::getPluginHelper($this, $params);
     return $this->_helper;
 }
开发者ID:shamusdougan,项目名称:Sapient_Web,代码行数:32,代码来源:snippets.php

示例4: modCacheCleaner

 function modCacheCleaner()
 {
     // Load plugin parameters
     require_once JPATH_PLUGINS . '/system/nnframework/helpers/parameters.php';
     $parameters = nnParameters::getInstance();
     $this->params = $parameters->getPluginParams('cachecleaner');
 }
开发者ID:AlexanderKri,项目名称:joom-upd,代码行数:7,代码来源:helper.php

示例5: __construct

 public function __construct($form = null)
 {
     $this->db = JFactory::getDBO();
     $parameters = nnParameters::getInstance();
     $params = $parameters->getPluginParams('nnframework');
     $this->max_list_count = $params->max_list_count;
 }
开发者ID:01J,项目名称:bealtine,代码行数:7,代码来源:field.php

示例6: getInput

 protected function getInput()
 {
     if (!nnFrameworkFunctions::extensionInstalled('zoo')) {
         return '<fieldset class="alert alert-danger">' . JText::_('ERROR') . ': ' . JText::sprintf('NN_FILES_NOT_FOUND', JText::_('NN_ZOO')) . '</fieldset>';
     }
     $this->params = $this->element->attributes();
     $this->db = JFactory::getDBO();
     $group = $this->get('group', 'categories');
     $tables = $this->db->getTableList();
     if (!in_array($this->db->getPrefix() . 'zoo_' . ($group == 'applications' ? 'application' : 'category'), $tables)) {
         return '<fieldset class="alert alert-danger">' . JText::_('ERROR') . ': ' . JText::sprintf('NN_TABLE_NOT_FOUND', JText::_('NN_ZOO')) . '</fieldset>';
     }
     $parameters = nnParameters::getInstance();
     $params = $parameters->getPluginParams('nnframework');
     $this->max_list_count = $params->max_list_count;
     if (!is_array($this->value)) {
         $this->value = explode(',', $this->value);
     }
     $options = $this->{'get' . $group}();
     $size = (int) $this->get('size');
     $multiple = $this->get('multiple');
     require_once JPATH_PLUGINS . '/system/nnframework/helpers/html.php';
     switch ($group) {
         case 'categories':
             return nnHtml::selectlist($options, $this->name, $this->value, $this->id, $size, $multiple);
         default:
             return nnHtml::selectlistsimple($options, $this->name, $this->value, $this->id, $size, $multiple);
     }
 }
开发者ID:A-Bush,项目名称:pprod,代码行数:29,代码来源:zoo.php

示例7: __construct

 /**
  * Constructor.
  *
  * @param    array    An optional associative array of configuration settings.
  *
  * @see        JController
  */
 public function __construct()
 {
     // Load plugin parameters
     require_once JPATH_PLUGINS . '/system/nnframework/helpers/parameters.php';
     $this->parameters = nnParameters::getInstance();
     $this->_config = $this->parameters->getComponentParams('snippets');
     parent::__construct();
 }
开发者ID:shamusdougan,项目名称:Sapient_Web,代码行数:15,代码来源:item.php

示例8: getConfig

 /**
  * Function that gets the config settings
  *
  * @return    Object
  */
 protected function getConfig()
 {
     if (!isset($this->config)) {
         require_once JPATH_PLUGINS . '/system/nnframework/helpers/parameters.php';
         $parameters = nnParameters::getInstance();
         $this->config = $parameters->getComponentParams('advancedmodules');
     }
     return $this->config;
 }
开发者ID:ranrolls,项目名称:ras-full-portal,代码行数:14,代码来源:view.html.php

示例9: __construct

 /**
  * Constructor.
  *
  * @param    array    An optional associative array of configuration settings.
  *
  * @see        JController
  */
 public function __construct($config = array())
 {
     if (empty($config['filter_fields'])) {
         $config['filter_fields'] = array('id', 'a.id', 'name', 'a.name', 'alias', 'a.alias', 'description', 'a.description', 'ordering', 'a.ordering', 'published', 'a.published');
     }
     // Load plugin parameters
     require_once JPATH_PLUGINS . '/system/nnframework/helpers/parameters.php';
     $this->parameters = nnParameters::getInstance();
     parent::__construct($config);
 }
开发者ID:shamusdougan,项目名称:Sapient_Web,代码行数:17,代码来源:list.php

示例10: onAfterRoute

 public function onAfterRoute()
 {
     $this->_pass = 0;
     jimport('joomla.filesystem.file');
     if (JFile::exists(JPATH_PLUGINS . '/system/nnframework/helpers/protect.php')) {
         require_once JPATH_PLUGINS . '/system/nnframework/helpers/protect.php';
         // return if page should be protected
         if (nnProtect::isProtectedPage('', 1)) {
             return;
         }
     }
     // load the admin language file
     require_once JPATH_PLUGINS . '/system/nnframework/helpers/functions.php';
     nnFrameworkFunctions::loadLanguage('plg_' . $this->_type . '_' . $this->_name);
     // return if NoNumber Framework plugin is not installed
     if (!JFile::exists(JPATH_PLUGINS . '/system/nnframework/nnframework.php')) {
         if (JFactory::getApplication()->isAdmin() && JFactory::getApplication()->input->get('option') != 'com_login') {
             $msg = JText::_('SRC_NONUMBER_FRAMEWORK_NOT_INSTALLED') . ' ' . JText::sprintf('SRC_EXTENSION_CAN_NOT_FUNCTION', JText::_('SOURCERER'));
             $mq = JFactory::getApplication()->getMessageQueue();
             foreach ($mq as $m) {
                 if ($m['message'] == $msg) {
                     $msg = '';
                     break;
                 }
             }
             if ($msg) {
                 JFactory::getApplication()->enqueueMessage($msg, 'error');
             }
         }
         return;
     }
     if (JFile::exists(JPATH_PLUGINS . '/system/nnframework/helpers/protect.php')) {
         require_once JPATH_PLUGINS . '/system/nnframework/helpers/protect.php';
         // return if current page is an admin page
         if (nnProtect::isAdmin()) {
             return;
         }
     } else {
         if (JFactory::getApplication()->isAdmin()) {
             return;
         }
     }
     // load the site language file
     require_once JPATH_PLUGINS . '/system/nnframework/helpers/functions.php';
     nnFrameworkFunctions::loadLanguage('plg_' . $this->_type . '_' . $this->_name, JPATH_SITE);
     // Load plugin parameters
     require_once JPATH_PLUGINS . '/system/nnframework/helpers/parameters.php';
     $parameters = nnParameters::getInstance();
     $params = $parameters->getPluginParams($this->_name);
     // Include the Helper
     require_once JPATH_PLUGINS . '/' . $this->_type . '/' . $this->_name . '/helper.php';
     $class = get_class($this) . 'Helper';
     $this->_helper = new $class($params);
     $this->_pass = 1;
 }
开发者ID:jmangarret,项目名称:webtuagencia24,代码行数:55,代码来源:sourcerer.php

示例11: display

 /**
  * Display the view
  *
  */
 public function display($tpl = null)
 {
     require_once JPATH_PLUGINS . '/system/nnframework/helpers/parameters.php';
     $this->parameters = nnParameters::getInstance();
     $this->form = $this->get('Form');
     $this->item = $this->_models['item']->getItem(null, 1);
     $this->state = $this->get('State');
     $this->config = $this->parameters->getComponentParams('snippets', $this->state->params);
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     $this->addToolbar();
     parent::display($tpl);
 }
开发者ID:shamusdougan,项目名称:Sapient_Web,代码行数:20,代码来源:view.html.php

示例12: getInput

 protected function getInput()
 {
     $this->params = $this->element->attributes();
     $this->db = JFactory::getDbo();
     $parameters = nnParameters::getInstance();
     $params = $parameters->getPluginParams('nnframework');
     $this->max_list_count = $params->max_list_count;
     if (!is_array($this->value)) {
         $this->value = explode(',', $this->value);
     }
     $group = $this->get('group', 'categories');
     $options = $this->{'get' . $group}();
     $size = (int) $this->get('size');
     $multiple = $this->get('multiple');
     require_once JPATH_PLUGINS . '/system/nnframework/helpers/html.php';
     return nnHtml::selectlist($options, $this->name, $this->value, $this->id, $size, $multiple);
 }
开发者ID:jimyb3,项目名称:mathematicalteachingsite,代码行数:17,代码来源:content.php

示例13: getHelper

 /**
  * Create the helper object
  *
  * @return object The plugins helper object
  */
 private function getHelper()
 {
     // Already initialized, so return
     if ($this->_init) {
         return $this->_helper;
     }
     $this->_init = true;
     if (!$this->isFrameworkEnabled()) {
         return false;
     }
     require_once JPATH_PLUGINS . '/system/nnframework/helpers/protect.php';
     if (!nnProtect::isSystemPluginInstalled($this->_alias)) {
         return false;
     }
     // Load plugin parameters
     require_once JPATH_PLUGINS . '/system/nnframework/helpers/parameters.php';
     $parameters = nnParameters::getInstance();
     $params = $parameters->getPluginParams($this->_name);
     require_once JPATH_PLUGINS . '/system/nnframework/helpers/helper.php';
     $this->_helper = nnFrameworkHelper::getPluginHelper($this, $params);
     return $this->_helper;
 }
开发者ID:AlexanderKri,项目名称:joom-upd,代码行数:27,代码来源:articlesanywhere.php

示例14: getInput

 protected function getInput()
 {
     if (!nnFrameworkFunctions::extensionInstalled('akeebasubs')) {
         return '<fieldset class="radio"><label class="nn_label nn_label_error">' . JText::_('ERROR') . ': ' . JText::sprintf('NN_FILES_NOT_FOUND', JText::_('NN_AKEEBASUBS')) . '</label></fieldset>';
     }
     $this->params = $this->element->attributes();
     $this->db = JFactory::getDBO();
     $group = $this->get('group', 'categories');
     $tables = $this->db->getTableList();
     if (!in_array($this->db->getPrefix() . 'akeebasubs_' . $group, $tables)) {
         return '<fieldset class="radio"><label class="nn_label nn_label_error">' . JText::_('ERROR') . ': ' . JText::sprintf('NN_TABLE_NOT_FOUND', JText::_('NN_AKEEBASUBS')) . '</label></fieldset>';
     }
     $parameters = nnParameters::getInstance();
     $params = $parameters->getPluginParams('nnframework');
     $this->max_list_count = $params->max_list_count;
     if (!is_array($this->value)) {
         $this->value = explode(',', $this->value);
     }
     $options = $this->{'get' . $group}();
     $size = (int) $this->get('size');
     $multiple = $this->get('multiple');
     require_once JPATH_PLUGINS . '/system/nnframework/helpers/html.php';
     return nnHtml::selectlist($options, $this->name, $this->value, $this->id, $size, $multiple);
 }
开发者ID:smart-one,项目名称:3kita,代码行数:24,代码来源:akeebasubs.php

示例15: isCategoryList

 static function isCategoryList($context)
 {
     $hash = md5('isCategoryList_' . $context);
     if (nnCache::has($hash)) {
         return nnCache::get($hash);
     }
     // Return false if it is not a category page
     if ($context != 'com_content.category' || JFactory::getApplication()->input->get('view') != 'category') {
         return false;
     }
     // Return false if it is not a list layout
     if (JFactory::getApplication()->input->get('layout') && JFactory::getApplication()->input->get('layout') != 'list') {
         return false;
     }
     // Return true if it IS a list layout
     if (JFactory::getApplication()->input->get('layout') == 'list') {
         return true;
     }
     // Layout is empty, so check if default layout is list (default)
     require_once JPATH_PLUGINS . '/system/nnframework/helpers/parameters.php';
     $parameters = nnParameters::getInstance();
     $parameters = $parameters->getComponentParams('content');
     return nnCache::set($hash, $parameters->category_layout == '_:default');
 }
开发者ID:01J,项目名称:bealtine,代码行数:24,代码来源:helper.php


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