當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。