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


PHP JParameter::getParams方法代码示例

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


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

示例1: getParams

 function getParams($data)
 {
     // get params definitions
     $params = new JParameter($data);
     if (WF_JOOMLA15) {
         $xml = JPATH_PLUGINS . DS . 'system' . DS . 'jcemediabox.xml';
         $params->loadSetupFile($xml);
         return $params->getParams();
     } else {
         $xml = JPATH_PLUGINS . DS . 'system' . DS . 'jcemediabox' . DS . 'jcemediabox.xml';
         $parser = JFactory::getXMLParser('Simple');
         if ($parser->loadFile($xml)) {
             if ($fieldsets = $parser->document->getElementByPath('config')->getElementByPath('fields')->children()) {
                 foreach ($fieldsets as $fieldset) {
                     $params->setXML($fieldset);
                 }
             }
         }
         $groups = array();
         $array = array();
         foreach ($params->getGroups() as $group => $num) {
             $groups[] = $params->getParams('params', $group);
         }
         foreach ($groups as $group) {
             $array = array_merge($array, $group);
         }
         return $array;
     }
 }
开发者ID:omarmm,项目名称:MangLuoiBDS,代码行数:29,代码来源:view.html.php

示例2: getParams

 function getParams($data)
 {
     jimport('joomla.form.form');
     if (class_exists('JForm')) {
         //JForm::addFormPath(JPATH_PLUGINS . '/system/jcemediabox');
         $xml = JPATH_PLUGINS . '/system/jcemediabox/jcemediabox.xml';
         $params = new WFParameter($data, $xml, '', array('control' => 'config:fields:fieldset'));
         $params->addElementPath(JPATH_PLUGINS . '/system/jcemediabox/elements');
         $groups = array();
         $array = array();
         foreach ($params->getGroups() as $group) {
             $groups[] = $params->getParams('params', $group);
         }
         foreach ($groups as $group) {
             $array = array_merge($array, $group);
         }
         return $array;
     } else {
         // get params definitions
         $params = new JParameter($data, JPATH_PLUGINS . '/system/jcemediabox.xml');
         $xml = JPATH_PLUGINS . '/system/jcemediabox.xml';
         $params->loadSetupFile($xml);
         return $params->getParams();
     }
 }
开发者ID:01J,项目名称:bealtine,代码行数:25,代码来源:view.html.php

示例3: _render

 /**
  * Render a parameter.
  *
  * @param JParameter $parameter
  * @param KConfig    $config
  *
  * @return string
  */
 protected function _render($parameter, $config)
 {
     $params = $parameter->getParams($config->name, $config->group);
     foreach ($params as $key => $param) {
         $params[$key] = array($param[0] => $param[1]);
     }
     return $this->_template->renderHelper('ui.form', $params[0]);
 }
开发者ID:stonyyi,项目名称:anahita,代码行数:16,代码来源:form.php

示例4: fetchElement

	function fetchElement($name, $value, &$node, $control_name)
	{
		jimport( 'joomla.filesystem.folder' );
		jimport( 'joomla.filesystem.file' );
		$doc =& JFactory::getDocument();
		$lang = JFactory::getLanguage();

		$parameter_sets = array();
        
		$filter		= $node->attributes('filter');
		$exclude	= $node->attributes('exclude');


        // Load 2x Catalog Themes
        require_once(dirname(__FILE__) . "/../RokNavMenu.php");
        RokNavMenu::setFrontSideTemplate();
        RokNavMenu::loadCatalogs();



        foreach(RokNavMenu::$themes as $theme_name => $theme_info){
            $lang_file_path = JPath::clean($theme_info['path'].'/language/'.$lang->_lang.'.ini');
            $this->loadLangFile($lang_file_path, $theme_info['fullname']);

            $parms_file_path = JPath::clean($theme_info['path'].'/parameters.xml');
            if (JFile::exists($parms_file_path)) {
		        $parameters = new JParameter( $this->_parent->_raw, JPath::clean($parms_file_path));
			    $parameter_sets[$theme_name] = $parameters->getParams();
			}
        }


		
		// path to directory
		$template_themes_path = '/templates/'.$this->_getFrontSideTemplate().'/html/mod_roknavmenu/themes';
		$template_themes_full_path = JPath::clean(JPATH_ROOT.$template_themes_path);
		$template_theme_text = JText::_("Template theme");
		
		$module_themes_path = '/modules/mod_roknavmenu/themes'; 
		$module_themes_full_path = JPath::clean(JPATH_ROOT.$module_themes_path);
		$module_theme_text = JText::_("Default theme");
		
		$module_js_path = JURI::root(true).'/modules/mod_roknavmenu/lib/js';
		$doc->addScript($module_js_path."/switcher".$this->_getJSVersion().".js");
		$doc->addScriptDeclaration("window.addEvent('domready', function() {new NavMenuSwitcher('paramtheme');});");


		 /** Get the Template Themes parameters **/
		if (JFolder::exists($template_themes_full_path) && !JFile::exists($template_themes_full_path."/catalog.php")) {
			$folders = JFolder::folders($template_themes_full_path, $filter);
			if ( is_array($folders) )
			{
				reset($folders);
				while (list($key, $val) = each($folders)) {
					$folder =& $folders[$key];
					if ($exclude)
					{
						if (preg_match( chr( 1 ) . $exclude . chr( 1 ), $folder ))
						{
							continue;
						}
					}
					$theme_path = $template_themes_path.DS.$folder;
					
					$langfile = JPath::clean(JPATH_ROOT.$theme_path.DS.'language'.DS.$lang->_lang.'.ini');
					if (JFile::exists($langfile)) {
						$lang->_load($langfile,'roknavmenu_theme_template_'.$folder);
					}
					
					$param_file_path =  $theme_path.DS.'parameters.xml';
					if (JFile::exists(JPath::clean(JPATH_ROOT.$param_file_path))) { 
						
						$parameters = new JParameter( $this->_parent->_raw, JPath::clean(JPATH_ROOT.$param_file_path));
						$parameter_sets[$theme_path] = $parameters->getParams();
					}
				}
			}
		}
		 /** Get the Default Themes parameters **/
		if (JFolder::exists($module_themes_full_path) && !JFile::exists($module_themes_full_path."/catalog.php")) {
			$folders = JFolder::folders($module_themes_full_path, $filter);
			if ( is_array($folders) )
			{
				reset($folders);
				while (list($key, $val) = each($folders)) {
					$folder =& $folders[$key];
					if ($exclude)
					{
						if (preg_match( chr( 1 ) . $exclude . chr( 1 ), $folder ))
						{
							continue;
						}
					}

					$theme_path = $module_themes_path.DS.$folder;

					$langfile = JPath::clean(JPATH_ROOT.$theme_path.DS.'language'.DS.$lang->_lang.'.ini');
					if (JFile::exists($langfile)) {
						$lang->_load($langfile,'roknavmenu_theme_module_'.$folder);
					}
//.........这里部分代码省略.........
开发者ID:srbsnkr,项目名称:sellingonlinemadesimple,代码行数:101,代码来源:themeparameters.php


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