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


PHP JParameter::renderToArray方法代码示例

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


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

示例1: getPropertiesForm

 function getPropertiesForm()
 {
     $pManager =& getPluginManager();
     $pManager->loadPlugins('acl');
     $pManager->loadPlugins('field');
     $pManager->loadPlugins('hook');
     $pManager->loadPlugins('validation');
     $pane =& JPane::getInstance('sliders');
     $output = JHTML::_('jwf.indentedLine', '<div id="properties-container">', 2);
     $output .= JHTML::_('jwf.indentedLine', "<fieldset><legend>" . JText::_('Identification') . "</legend>", 2);
     $output .= JHTML::_('jwf.indentedLine', "<label for='properties_input_title'>" . JText::_('Title') . "</label>", 2);
     $output .= JHTML::_('jwf.indentedLine', "<input onchange='saveElement()' type='text' id='properties_input_title' />", 2);
     $output .= JHTML::_('jwf.indentedLine', "<div class='clear'></div>", 2);
     $output .= JHTML::_('jwf.indentedLine', "<label for='properties_input_task'>" . JText::_('Task') . "</label>", 2);
     $output .= JHTML::_('jwf.indentedLine', "<textarea onchange='saveElement()' id='properties_input_task'></textarea>", 2);
     $output .= JHTML::_('jwf.indentedLine', "<div class='clear'></div>", 2);
     $output .= JHTML::_('jwf.indentedLine', "<label id='properties_lbl_acl' for='properties_input_acl'>" . JText::_('Group') . "</label>", 2);
     $output .= JHTML::_('select.genericlist', array(), "properties_input_acl", 'onchange="saveElement()" class="inputbox" size="1"', 'value', 'text', '', 'properties_input_acl');
     $output .= JHTML::_('jwf.indentedLine', "<div class='clear'></div>", 2);
     $output .= JHTML::_('jwf.indentedLine', "<input onclick='deleteSelectedElement()' id='properties_input_delete' type='button' value='" . JText::_('Delete Station') . "' />", 2);
     $output .= JHTML::_('jwf.indentedLine', "<div class='clear'></div>", 2);
     $output .= JHTML::_('jwf.indentedLine', "</fieldset>", 2);
     $output .= JHTML::_('jwf.indentedLine', "<fieldset><legend>" . JText::_('Allocated Time') . "</legend>", 2);
     $output .= JHTML::_('jwf.indentedLine', "<label style='width:40px;' id='properties_lbl_hours' for='properties_input_hours'>" . JText::_('Hours') . "</label>", 2);
     $output .= JHTML::_('select.integerlist', 0, 23, 1, "properties_input_hours", 'id="properties_input_hours" style="width:40px;" onchange="saveElement()" class="inputbox" size="1"');
     $output .= JHTML::_('jwf.indentedLine', "<div class='clear'></div>", 2);
     $output .= JHTML::_('jwf.indentedLine', "<label style='width:40px;' id='properties_lbl_days' for='properties_input_days'>" . JText::_('Days') . "</label>", 2);
     $output .= JHTML::_('select.integerlist', 0, 30, 1, "properties_input_days", 'id="properties_input_days" style="width:40px;" onchange="saveElement()" class="inputbox" size="1"');
     $output .= JHTML::_('jwf.indentedLine', "<div class='clear'></div>", 2);
     $output .= JHTML::_('jwf.indentedLine', "<label style='width:40px;' id='properties_lbl_months' for='properties_input_months'>" . JText::_('Months') . "</label>", 2);
     $output .= JHTML::_('select.integerlist', 0, 11, 1, "properties_input_months", 'id="properties_input_months" style="width:40px;" onchange="saveElement()" class="inputbox" size="1"');
     $output .= JHTML::_('jwf.indentedLine', "<div class='clear'></div>", 2);
     $output .= JHTML::_('jwf.indentedLine', "</fieldset>", 2);
     $fieldList = array();
     $output .= JHTML::_('jwf.indentedLine', "<label id='properties_lbl_fields' for='properties_input_fields'>" . JText::_('Active fields') . "</label>", 2);
     foreach ($pManager->settings['field'] as $p) {
         $fieldList[] = JHTML::_('select.option', $p->id, JText::_($p->name));
     }
     $output .= JHTML::_('select.genericlist', $fieldList, "properties_input_fields", 'multiple="multiple" class="inputbox field" size="5"', 'value', 'text');
     $output .= JHTML::_('jwf.indentedLine', "<div class='clear'></div>", 2);
     $validationList = array();
     $output .= JHTML::_('jwf.indentedLine', "<label id='properties_lbl_validations' for='properties_input_validations'>" . JText::_('Active validations') . "</label>", 2);
     foreach ($pManager->settings['validation'] as $p) {
         $validationList[] = JHTML::_('select.option', $p->id, JText::_($p->name));
     }
     $output .= JHTML::_('select.genericlist', $validationList, "properties_input_validations", 'multiple="multiple" class="inputbox validation" size="5"', 'value', 'text');
     $output .= JHTML::_('jwf.indentedLine', "<div class='clear'></div>", 2);
     $output .= JHTML::_('jwf.indentedLine', "<h2>" . JText::_('Active hooks') . "</h2>", 2);
     $output .= JHTML::_('jwf.indentedLine', "<form id='hook-settings-form'>", 2);
     $hookList = array();
     $paneOutput = JHTML::_('jwf.hiddenPane');
     $paneOutput .= $pane->startPane('hooks-pane');
     foreach ($pManager->settings['hook'] as $p) {
         $form = new JParameter('', $p->xml);
         $params = $form->renderToArray();
         $paneOutput .= JHTML::_('jwf.startJSBlock', 2);
         $paneOutput .= JHTML::_('jwf.indentedLine', 'hookParameters["' . $p->id . '"] = new Array();', 3);
         $i = 0;
         foreach ($params as $key => $value) {
             $paneOutput .= JHTML::_('jwf.indentedLine', 'hookParameters["' . $p->id . '"][' . $i . '] = "' . $key . '"', 3);
             $i++;
         }
         $paneOutput .= JHTML::_('jwf.endJSBlock', 2);
         $title = JText::_($p->name . ' ' . JText::_('Settings'));
         $paneOutput .= '<div class="search-pane-list-handle"></div>';
         $paneOutput .= '<div class="search-pane-list-check"><input value="' . $p->id . '" type="checkbox" class="active-hooks" name="properties_input_hooks[' . $p->id . ']" checked="checked" id="properties_input_hook_' . $p->id . '" /></div>';
         $paneOutput .= $pane->startPanel($title, "form-page");
         $paneOutput .= $form->render('hooks-' . $p->id);
         $paneOutput .= $pane->endPanel();
     }
     $paneOutput .= $pane->endPane();
     $paneOutput .= JHTML::_('jwf.indentedLine', "</form>", 2);
     $output .= $paneOutput;
     $output .= JHTML::_('jwf.indentedLine', '</div>', 2);
     return $output;
 }
开发者ID:BGCX261,项目名称:zonales-svn-to-git,代码行数:76,代码来源:view.html.php


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