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


PHP WFParameter::addElementPath方法代码示例

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


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

示例1: display

 function display($tpl = null)
 {
     $language = JFactory::getLanguage();
     $language->load('plg_editors_jce', JPATH_ADMINISTRATOR);
     $client = JRequest::getWord('client', 'site');
     $model = $this->getModel();
     $plugin = WFExtensionHelper::getPlugin();
     $xml = WF_EDITOR_LIBRARIES . '/xml/config/editor.xml';
     $data = null;
     // get params from editor plugin
     if ($plugin->params && $plugin->params !== "{}") {
         $data = json_decode($plugin->params);
     } else {
         $component = WFExtensionHelper::getComponent();
         // get params from component "params" field (legacy)
         if ($component->params) {
             $data = json_decode($component->params);
         }
     }
     // get params definitions
     $params = new WFParameter($data, $xml, 'editor');
     $params->addElementPath(JPATH_COMPONENT . '/elements');
     $this->assign('model', $model);
     $this->assign('params', $params);
     $this->assign('client', $client);
     WFToolbarHelper::apply();
     WFToolbarHelper::save();
     WFToolbarHelper::help('config.about');
     parent::display($tpl);
 }
开发者ID:spikart,项目名称:spikart.com.ua,代码行数:30,代码来源:view.html.php

示例2: display

 function display($tpl = null)
 {
     $db = JFactory::getDBO();
     $client = JRequest::getWord('client', 'admin');
     $model = $this->getModel();
     $this->document->setTitle(WFText::_('WF_PREFERENCES_TITLE'));
     $this->document->addStyleSheet('templates/system/css/system.css');
     $component = WFExtensionHelper::getComponent();
     $xml = JPATH_COMPONENT . '/models/preferences.xml';
     // get params definitions
     $params = new WFParameter($component->params, $xml, 'preferences');
     $params->addElementPath(JPATH_COMPONENT . '/elements');
     if (WFModel::authorize('admin')) {
         $form = $model->getForm('permissions');
     } else {
         $form = null;
     }
     $this->assign('params', $params);
     $this->assign('permissons', $form);
     $this->addStyleSheet('components/com_jce/media/css/preferences.css');
     $this->addScript('components/com_jce/media/js/preferences.js');
     if (JRequest::getInt('close') == 1) {
         $this->addScriptDeclaration('jQuery(document).ready(function($){$.jce.Preferences.close();});');
     } else {
         $this->addScriptDeclaration('jQuery(document).ready(function($){$.jce.Preferences.init();});');
     }
     parent::display($tpl);
 }
开发者ID:DanyCan,项目名称:wisten.github.io,代码行数:28,代码来源:view.html.php

示例3: 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

示例4: display

 function display($tpl = null)
 {
     $db = JFactory::getDBO();
     $language = JFactory::getLanguage();
     $language->load('plg_editors_jce', JPATH_ADMINISTRATOR);
     $client = JRequest::getWord('client', 'site');
     $model = $this->getModel();
     $lists = array();
     $component = WFExtensionHelper::getComponent();
     $xml = WF_EDITOR_LIBRARIES . DS . 'xml' . DS . 'config' . DS . 'editor.xml';
     // get params definitions
     $params = new WFParameter($component->params, $xml, 'editor');
     $params->addElementPath(JPATH_COMPONENT . DS . 'elements');
     $this->assignRef('model', $model);
     $this->assignRef('params', $params);
     $this->assignRef('client', $client);
     WFToolbarHelper::save();
     WFToolbarHelper::apply();
     WFToolbarHelper::help('config.about');
     parent::display($tpl);
 }
开发者ID:andreassetiawanhartanto,项目名称:PDKKI,代码行数:21,代码来源:view.html.php

示例5: getLayoutParams

 function getLayoutParams(&$row)
 {
     // get params definitions
     $xml = WF_EDITOR_LIBRARIES . '/xml/config/layout.xml';
     // get editor params
     $params = new WFParameter($row->params, $xml, 'editor');
     $params->addElementPath(JPATH_COMPONENT . '/elements');
     $params->addElementPath(WF_EDITOR . '/elements');
     $groups = $params->getGroups();
     $row->layout_params = $params;
     $row->layout_groups = $groups;
 }
开发者ID:grlf,项目名称:eyedock,代码行数:12,代码来源:profiles.php

示例6: foreach

     }
 }
 foreach ($items as $extension) {
     // get extension xml file
     $file = $extension->manifest;
     if ($extension->core == 0) {
         // Load extension language file
         $language = JFactory::getLanguage();
         $language->load('com_jce_' . $extension->folder . '_' . trim($extension->extension), JPATH_SITE);
     }
     if (JFile::exists($file)) {
         // get params for plugin
         $key = $plugin->name . '.' . $type . '.' . $extension->extension;
         $params = new WFParameter($this->profile->params, $file, $key);
         // add element paths
         $params->addElementPath(array(WF_EDITOR . '/elements'));
         // render params
         if (!$params->hasParent()) {
             $key = array($plugin->name, $type, $extension->extension);
             $enabled = (int) $params->get('enable', 1);
             $checked = $enabled ? ' checked="checked"' : '';
             $html .= '<h3><input type="hidden" id="params' . implode('', $key) . 'enable" name="params[' . implode('][', $key) . '][enable]" value="' . $enabled . '" /><input type="checkbox" data-name="' . $extension->extension . '" class="plugins-enable-checkbox"' . $checked . '/>' . WFText::_($extension->name) . '</h3>';
             $html .= '<p>' . WFText::_($extension->description) . '</p>';
             foreach ($params->getGroups() as $group) {
                 $html .= $params->render('params[' . implode('][', $key) . ']', $group, array('enable'));
             }
         }
     }
 }
 if ($html) {
     echo '<fieldset class="adminform panelform"><legend>' . WFText::_('WF_EXTENSIONS_' . strtoupper($type) . '_TITLE') . '</legend>';
开发者ID:01J,项目名称:bealtine,代码行数:31,代码来源:form_plugin.php

示例7: foreach

            // Get extensions supported by this plugin
            $extensions = $this->model->getExtensions($plugin->name);
            foreach ($extensions as $extension) {
                // get extension xml file
                $file = $extension->manifest;
                if ($extension->core == 0) {
                    // Load extension language file
                    $language = JFactory::getLanguage();
                    $language->load('com_jce_' . $extension->folder . '_' . trim($extension->extension), JPATH_SITE);
                }
                if (JFile::exists($file)) {
                    // get params for plugin
                    $key = $plugin->name . '.' . $extension->type . '.' . $extension->extension;
                    $params = new WFParameter($this->profile->params, $file, $key);
                    // add element paths
                    $params->addElementPath(JPATH_COMPONENT . DS . 'elements');
                    $params->addElementPath(JPATH_COMPONENT_SITE . DS . 'elements');
                    $params->addElementPath(WF_EDITOR . DS . 'elements');
                    // render params
                    if (!$params->hasParent()) {
                        echo '<fieldset class="adminform panelform"><legend>' . WFText::_($extension->name) . '</legend>';
                        echo '<p>' . WFText::_($extension->description) . '</p>';
                        foreach ($params->getGroups() as $group => $num) {
                            echo $params->render('params[' . $plugin->name . '][' . $extension->type . '][' . $group . ']', $group);
                        }
                        echo '</fieldset>';
                    }
                }
            }
            ?>
			</div>
开发者ID:andreassetiawanhartanto,项目名称:PDKKI,代码行数:31,代码来源:form_plugin.php


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