• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP JDom类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: build

 function build()
 {
     $html = '';
     $ctrl = $this->ctrl ? $this->ctrl . '.' : '';
     $html = JDom::_('html.grid.bool', array_merge($this->options, array('strNO' => $this->togglable ? 'JTOOLBAR_PUBLISH' : 'JNO', 'strYES' => $this->togglable ? 'JTOOLBAR_UNPUBLISH' : 'JYES')));
     return $html;
 }
开发者ID:gwtrains,项目名称:comRTiPrint,代码行数:7,代码来源:publish.php


示例2: build

 function build()
 {
     $html = "\n" . "<div id='" . $this->ajaxWrapper . "'" . ($this->required ? " class='ajax-required'" : "") . "></div>";
     $html .= LN . '<%VALIDOR_ICON%>' . LN . '<%MESSAGE%>';
     $html .= JDom::_('html.form.input.hidden', array_merge($this->options, array('dataValue' => $this->dataValue == 0 ? "" : $this->dataValue)));
     return $html;
 }
开发者ID:gwtrains,项目名称:comRTiPrint,代码行数:7,代码来源:load.php


示例3: build

 function build()
 {
     $jinput = new JInput();
     //Initialize default form
     $keys = array('option' => $this->getExtension(), 'view' => $this->getView(), 'layout' => $jinput->get('layout', null, 'CMD'), 'task' => "");
     //For item layout
     if (isset($this->dataObject)) {
         $keys['id'] = isset($this->dataObject->id) ? $this->dataObject->id : 0;
         //Deprecated
         $keys['cid[]'] = isset($this->dataObject->id) ? $this->dataObject->id : 0;
     }
     //Specifics values or overrides
     if (isset($this->values)) {
         foreach ($this->values as $key => $value) {
             $keys[$key] = $value;
         }
     }
     //Reproduce current query in the form
     $followers = array('lang', 'Itemid', 'tmpl');
     //Cmd types only for the moment
     foreach ($followers as $follower) {
         $val = $jinput->get($follower, null, 'CMD');
         if ($val) {
             $keys[$follower] = $val;
         }
     }
     $html = "";
     foreach ($keys as $key => $value) {
         $html .= JDom::_('html.form.input.hidden', array('dataKey' => $key, 'dataValue' => $value));
     }
     //Token
     $html .= JHTML::_('form.token');
     return $html;
 }
开发者ID:gwtrains,项目名称:comRTiPrint,代码行数:34,代码来源:footer.php


示例4: displayAjax

 /**
  * Execute and display ajax queries
  *
  * @access	protected
  * @param	string	$tpl	The name of the template file to parse; automatically searches through the template paths.
  *
  * @return	mixed	A string if successful, otherwise a JError object.
  *
  * @since	11.1
  */
 protected function displayAjax($tpl = null)
 {
     $jinput = JFactory::getApplication()->input;
     $render = $jinput->get('render', null, 'CMD');
     $token = $jinput->get('token', null, 'BASE64');
     $values = $jinput->get('values', null, 'ARRAY');
     switch ($render) {
         case 'filter3':
             /* Ajax Filter : Manufacturer > Name
              * Called from: view:printers, layout:default
              * Group Level : 1
              */
             $model = $this->getModel();
             $model->addSelect('a.name');
             $items = $model->getItems();
             $selected = is_array($values) ? $values[count($values) - 1] : $values;
             $ajaxNamespace = "rtiprint.printermdls.ajax.filter3";
             $wrapper = "_ajax_printermdls_{$render}";
             $event = 'jQuery("#filter_printer_model").val("");' . 'if(this.value != ""){' . 'jQuery("#' . $wrapper . '").jdomAjax({namespace:"' . $ajaxNamespace . '", vars:{"filter_manufacturer":this.value}})' . '}else{' . 'jQuery("#' . $wrapper . '").innerHTML = "";' . '}';
             echo '<div class="ajaxchain-filter ajaxchain-filter-hz">';
             echo JDom::_('html.form.input.select', array('dataKey' => 'filter_printer_model_manufacturer', 'dataValue' => $selected, 'domClass' => 'span-2 element-filter', 'labelKey' => 'name', 'list' => $items, 'listKey' => 'id', 'nullLabel' => 'RTIPRINT_FILTER_NULL_MANUFACTURER', 'selectors' => array('onchange' => $event), 'ui' => 'chosen'));
             echo '</div>';
             //Ajax chain on load -> Follows the values
             echo JDom::_('html.form.input.ajax.chain', array('ajaxWrapper' => $wrapper, 'ajaxContext' => $ajaxNamespace, 'ajaxVars' => array('filter_manufacturer' => $selected, 'values' => $values), 'ajaxToken' => $token));
             //Wrapper Div
             echo "<div id='" . $wrapper . "' class='ajaxchain-wrapper ajaxchain-wrapper-hz'></div>";
             break;
     }
     exit;
 }
开发者ID:gwtrains,项目名称:comRTiPrint,代码行数:40,代码来源:view.html.php


示例5: build

 function build()
 {
     $dir = $this->pathToUrl($this->systemImagesDir(), true);
     $task = $this->ctrl . '.saveorder';
     $alt = JText::_('JGRID_HEADING_ORDERING');
     $htmlIcon = '<div style="background-image:url(' . $dir . '/filesave.png); width:16px; height:16px; display:inline-block"></div>';
     $html = JDom::_('html.link', array('content' => $htmlIcon, 'title' => JText::_('Save Order'), 'task' => $task));
     return $html;
 }
开发者ID:gwtrains,项目名称:comRTiPrint,代码行数:9,代码来源:saveorder.php


示例6: build

 function build()
 {
     if ($this->viewType == 'text') {
         //Text alone
         $html = JDom::_('html.fly', array('dataValue' => JText::_($this->label), 'task' => $this->task, 'num' => $this->num, 'tooltip' => $this->tooltip, 'title' => JText::_($this->label), 'description' => $this->description));
         return $html;
     }
     return JHTML::_('jgrid.action', $this->num, $this->task, array('active_title' => JText::_($this->label) . '::' . JText::_($this->description), 'inactive_title' => JText::_($this->label) . '::' . JText::_($this->description), 'tip' => $this->tooltip, 'active_class' => $this->taskIcon, 'inactive_class' => $this->taskIcon, 'enabled' => $this->enabled, 'translate' => true, 'checkbox' => 'cb', 'prefix' => $this->ctrl ? $this->ctrl . '.' : ''));
 }
开发者ID:gwtrains,项目名称:comRTiPrint,代码行数:9,代码来源:task.php


示例7: build

 function build()
 {
     // Load the modal behavior script.
     JHtml::_('behavior.modal', 'a.modal');
     $id = $this->dataKey;
     $name = $this->name;
     $label = JText::_($this->nullLabel);
     $link = $this->getRoute($this->route, 'modal');
     $rel = '{handler: \'iframe\', size: {x: ' . $this->width . ', y: ' . $this->height . '}}';
     $title = $this->title;
     if (empty($title)) {
         $title = $label;
     }
     $scriptReset = "document.id('" . $id . "_id').value = '';";
     $scriptReset .= "document.id('" . $id . "_name').value = '" . htmlspecialchars($label, ENT_QUOTES, 'UTF-8') . "';";
     $html = array();
     //Remove button
     $htmlReset = '	<a class="btn"' . ' title="' . htmlspecialchars($label, ENT_QUOTES, 'UTF-8') . '"' . ' onclick="' . htmlspecialchars($scriptReset, ENT_QUOTES, 'UTF-8') . '"' . '>' . LN;
     $htmlReset .= ' <i class="icon-delete"></i>' . LN;
     $htmlReset .= ' </a>' . LN;
     //Input area (readonly)
     $htmlInput = JDom::_('html.form.input.text', array('dataKey' => $id . '_name', 'dataValue' => $title, 'domClass' => 'inputbox input-medium', 'selectors' => array('disabled' => 'disabled', 'readonly' => 'readonly'), 'size' => 40));
     //Select button
     $htmlSelect = '	<a class="modal btn btn-primary" title="' . $label . '"  href="' . $link . '" rel="' . $rel . '">' . LN;
     $htmlSelect .= ' <i class="icon-list icon-white"></i> ' . JText::_('JSELECT') . LN;
     $htmlSelect .= ' </a>' . LN;
     // Hidden field
     $htmlHidden = JDom::_('html.form.input.hidden', array('dataKey' => $this->dataKey . '_id', 'domName' => $this->domName, 'dataValue' => $this->dataValue));
     $htmlTasks = '';
     //Extra tasks buttons
     if (count($this->tasks)) {
         foreach ($this->tasks as $taskName => $task) {
             $label = isset($task['label']) ? JText::_($task['label']) : '';
             $desc = isset($task['description']) ? JText::_($task['description']) : $label;
             $jsCommand = isset($task['jsCommand']) ? $task['jsCommand'] : null;
             $icon = isset($task['icon']) ? $task['icon'] : $taskName;
             $caption = '';
             if (in_array($this->display, array('icon', 'both'))) {
                 $caption .= ' <i class="icon-' . $icon . '"></i> ';
             }
             if (in_array($this->display, array('text', 'both'))) {
                 $caption .= $label;
             }
             $htmlTasks .= '	<a class="btn hasTooltip" title="' . htmlspecialchars($desc, ENT_QUOTES, 'UTF-8') . '"' . ($jsCommand ? ' onclick="' . htmlspecialchars($jsCommand, ENT_QUOTES, 'UTF-8') . '"' : '') . '>' . LN;
             $htmlTasks .= $caption;
             $htmlTasks .= ' </a>' . LN;
         }
     }
     // Construct the control
     $html = $htmlReset . $htmlInput . $htmlSelect . $htmlTasks;
     // Embed in bootsrap btn-group
     $html = '<span class="input-append input-prepend">' . $html . '</span>';
     // Add the hidden field (storing the value)
     $html .= $htmlHidden;
     return $html;
 }
开发者ID:gwtrains,项目名称:comRTiPrint,代码行数:56,代码来源:modalpicker.php


示例8: build

 function build()
 {
     $html = "";
     if (isset($this->dataValue) && isset($this->list[$this->dataValue][$this->labelKey])) {
         $html = $this->list[$this->dataValue][$this->labelKey];
     }
     //Embed in a bootstrap label
     $html = JDom::_('html.label', array('content' => $html));
     return $html;
 }
开发者ID:gwtrains,项目名称:comRTiPrint,代码行数:10,代码来源:enum.php


示例9: build

 function build()
 {
     //Requires jQuery
     JDom::_('framework.jquery');
     if ($this->live) {
         $this->addScript($this->hostedSource);
     } else {
         $this->attachJs[] = 'jquery.ui.min.js';
     }
 }
开发者ID:gwtrains,项目名称:comRTiPrint,代码行数:10,代码来源:ui.php


示例10: build

 function build()
 {
     if ($this->position == 'top') {
         //Must reverse the order of filters of the right side
         $filtersLeft = array();
         $filtersRight = array();
         if (!empty($this->list)) {
             foreach ($this->list as $filter) {
                 if ($filter->align && $filter->align == 'right') {
                     $filtersRight[] = $filter;
                 } else {
                     $filtersLeft[] = $filter;
                 }
             }
         }
         $filtersRight = array_reverse($filtersRight);
         $this->list = array_merge($filtersLeft, $filtersRight);
     }
     if (empty($this->list)) {
         return;
     }
     $html = array();
     $i = 0;
     foreach ($this->list as $filter) {
         // Horizontal separator
         if ($i > 0 && $this->position == 'sidebar') {
             $html[] = '<hr class="hr-condensed" />';
         }
         $htmlControl = '';
         // Label is invisible
         $htmlControl .= '<label class="element-invisible">';
         $htmlControl .= $filter->label;
         $htmlControl .= '</label>';
         // Render the input
         $htmlControl .= $filter->input;
         $classes = array();
         //Wrap in a div for horizontal alignement
         if ($filter->align && in_array($filter->align, array('left', 'right'))) {
             $classes[] = 'btn-group';
             $classes[] = 'pull-' . $filter->align;
         }
         if ($responsive = $filter->responsive) {
             $classes[] = $this->getResponsiveClass($responsive);
         }
         if (count($classes)) {
             $htmlControl = JDom::_('html.fly', array('domClass' => implode(' ', $classes), 'dataValue' => $htmlControl, 'markup' => 'div'));
         }
         $html[] = $htmlControl;
         $i++;
     }
     return implode('', $html);
 }
开发者ID:gwtrains,项目名称:comRTiPrint,代码行数:52,代码来源:default.php


示例11: build

 function build()
 {
     if (empty($this->list)) {
         return;
     }
     $html = '';
     $html .= '<ul id="submenu" class="nav nav-list">';
     foreach ($this->list as $item) {
         $html .= JDom::_('html.link.menu.submenu', array('content' => JText::_($item[0]), 'href' => $item[1], 'active' => $item[2]));
     }
     $html .= '</ul>';
     return $html;
 }
开发者ID:gwtrains,项目名称:comRTiPrint,代码行数:13,代码来源:submenu.php


示例12: build

 function build()
 {
     if ($this->groupBy) {
         $options = $this->buildOptionsGroup();
     } else {
         $options = $this->buildOptions();
     }
     if ($this->ui == 'chosen') {
         JDom::_('framework.jquery.chosen');
         $this->addClass('chzn-select');
     }
     $html = '<select id="<%DOM_ID%>" name="<%INPUT_NAME%>"<%STYLE%><%CLASS%><%SELECTORS%>' . ((int) $this->size > 1 ? ' size="' . (int) $this->size . '"' : '') . '>' . LN . $this->indent($this->buildDefault(), 1) . $this->indent($options, 1) . '</select>' . LN . '<%VALIDOR_ICON%>' . LN . '<%MESSAGE%>';
     return $html;
 }
开发者ID:gwtrains,项目名称:comRTiPrint,代码行数:14,代码来源:combo.php


示例13: build

 function build()
 {
     return JDom::_('html.fly.datetime', $this->options);
     //DEPRECATED : Use fly.datetime
     $formatedDate = "";
     if ($this->dataValue && $this->dataValue != "0000-00-00" && $this->dataValue != "00:00:00" && $this->dataValue != "0000-00-00 00:00:00") {
         jimport("joomla.utilities.date");
         $date = new JDate($this->dataValue);
         $formatedDate = $date->toFormat($this->dateFormat);
     }
     $this->addClass('grid-date');
     $html = '<span <%STYLE%><%CLASS%><%SELECTORS%>>' . $formatedDate . '</span>';
     return $html;
 }
开发者ID:gwtrains,项目名称:comRTiPrint,代码行数:14,代码来源:datetime.php


示例14: build

 function build()
 {
     //Only for bootstrap
     if (!$this->useFramework('bootstrap')) {
         echo $this->error('Bootstrap is required');
         return;
     }
     if (!$this->href) {
         $this->href = '#';
     }
     JDom::_('framework.bootstrap');
     $this->addSelector('rel', $this->rel);
     $this->link_title = $this->title;
     $html = '<a<%ID%><%CLASS%><%STYLE%><%TITLE%><%HREF%><%JS%><%TARGET%><%SELECTORS%>' . ' data-title="' . $this->title . '"' . ' data-content="' . $this->contents . '"' . '>' . $this->content . '</a>';
     return $html;
 }
开发者ID:gwtrains,项目名称:comRTiPrint,代码行数:16,代码来源:popover.php


示例15: build

 function build()
 {
     //Icon alone
     if ($this->viewType == 'icon') {
         $html .= JDom::_('html.icon', array('icon' => $this->icon, 'tooltip' => true, 'title' => $this->text));
         return $html;
     }
     //Icon
     if ($this->viewType == 'both') {
         $html .= JDom::_('html.icon', array('icon' => $this->icon));
     }
     $html .= $this->text;
     //Embed in label
     $html = JDom::_('html.label', array('content' => $html, 'color' => $this->color));
     return $html;
 }
开发者ID:gwtrains,项目名称:comRTiPrint,代码行数:16,代码来源:publish.php


示例16: getInput

 /**
  * Method to get the field input markup.
  *
  * @access	public
  *
  * @return	string	The field input markup.
  *
  * @since	11.1
  */
 public function getInput()
 {
     $options = array();
     if (!isset($this->jdomOptions['list'])) {
         //Get the options from XML
         foreach ($this->element->children() as $option) {
             $opt = new stdClass();
             foreach ($option->attributes() as $attr => $value) {
                 $opt->{$attr} = (string) $value;
             }
             $opt->text = JText::_(trim((string) $option));
             $options[] = $opt;
         }
     }
     $this->input = JDom::_('html.form.input.select.limit', array_merge(array('dataKey' => $this->getOption('name'), 'domClass' => $this->getOption('class'), 'domId' => $this->id, 'domName' => $this->name, 'dataValue' => (string) $this->value, 'labelKey' => $this->getOption('labelKey'), 'list' => $options, 'listKey' => $this->getOption('listKey'), 'nullLabel' => $this->getOption('nullLabel'), 'responsive' => $this->getOption('responsive'), 'size' => $this->getOption('size', 1, 'int'), 'submitEventName' => $this->getOption('submit') == 'true' ? 'onchange' : null, 'ui' => $this->getOption('ui')), $this->jdomOptions));
     return parent::getInput();
 }
开发者ID:gwtrains,项目名称:comRTiPrint,代码行数:26,代码来源:cklimit.php


示例17: build

 function build()
 {
     $htmlInput = JDom::_('html.form.input', array_merge($this->options, array('placeholder' => $this->label, 'title' => $this->label)));
     $html = '<div class=" form-search btn-group">';
     //Button group
     $html .= '<div class="input-append">';
     $html .= $htmlInput;
     //Search Button
     $html .= JDom::_('html.link.button.icon', array('icon' => 'search', 'link_title' => JText::_('JSEARCH_FILTER_SUBMIT'), 'submitEventName' => 'onclick'));
     $html .= '</div>';
     //Clear Button
     $html .= '<div class="btn-group">';
     $html .= JDom::_('html.link.button.icon', array('icon' => 'remove', 'link_title' => JText::_('JSEARCH_FILTER_CLEAR'), 'link_js' => 'Joomla.resetFilters();', 'domClass' => ''));
     $html .= '</div>';
     $html .= '</div>';
     return $html;
 }
开发者ID:gwtrains,项目名称:comRTiPrint,代码行数:17,代码来源:search.php


示例18: build

 function build()
 {
     if (!$this->href) {
         $this->href = '#';
     }
     JDom::_('framework.bootstrap');
     if ($this->useFramework('bootstrap')) {
         $this->addSelector('rel', $this->rel);
         $this->link_title = $this->contents;
     } else {
         //Legacy MooTools tooltips
         $this->addClass('hasTip');
         $this->addSelector('rel', $this->contents);
     }
     $html = '<a<%ID%><%CLASS%><%STYLE%><%TITLE%><%HREF%><%JS%><%TARGET%><%SELECTORS%>>' . $this->content . '</a>';
     return $html;
 }
开发者ID:gwtrains,项目名称:comRTiPrint,代码行数:17,代码来源:tooltip.php


示例19: buildItems

 function buildItems()
 {
     $htmlItems = '';
     if ($this->align == 'right') {
         $this->items = array_reverse($this->items);
     }
     foreach ($this->items as $item) {
         if (!count($item)) {
             continue;
         }
         $itemNameSpace = 'html.link.button.toolbar.' . strtolower($item[0]);
         $htmlItems .= JDom::_($itemNameSpace, array('item' => $item, 'checkList' => $this->list != null, 'ui' => $this->ui, 'display' => $this->display)) . LN;
     }
     $html = '<ul<%STYLE%><%CLASS%>>' . $htmlItems . '</ul>';
     $html .= '<br clear="all"/>';
     return $html;
 }
开发者ID:gwtrains,项目名称:comRTiPrint,代码行数:17,代码来源:toolbar.php


示例20: build

 function build()
 {
     if (empty($this->list)) {
         return;
     }
     $html = '';
     $html .= '<div class="cpanel">';
     foreach ($this->list as $item) {
         $title = JText::_($item[0]);
         if ($this->maxLength && strlen($title) > $this->maxLength) {
             $title = substr($title, 0, $this->maxLength - 1) . '...';
         }
         $class = 'ico-' . $this->iconSize . '-' . (isset($item[3]) ? $item[3] : null);
         $html .= JDom::_('html.link.menu.cpanel', array('content' => $title, 'href' => $item[1], 'link_title' => $item[0], 'imageClass' => $class, 'iconSize' => $this->iconSize, 'buttonWidth' => $this->buttonWidth, 'buttonHeight' => $this->buttonHeight));
     }
     $html .= '</div>';
     return $html;
 }
开发者ID:gwtrains,项目名称:comRTiPrint,代码行数:18,代码来源:cpanel.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP JEVConfig类代码示例发布时间:2022-05-23
下一篇:
PHP JDocumentHtml类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap