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


PHP AviaHtmlHelper::render_element方法代码示例

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


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

示例1: editor_element

 /**
  * Editor Element - this function defines the visual appearance of an element on the AviaBuilder Canvas
  * Most common usage is to define some markup in the $params['innerHtml'] which is then inserted into the drag and drop container
  * Less often used: $params['data'] to add data attributes, $params['class'] to modify the className
  *
  *
  * @param array $params this array holds the default values for $content and $args.
  * @return $params the return array usually holds an innerHtml key that holds item specific markup.
  */
 function editor_element($params)
 {
     //fetch all registered sidebars
     $sidebars = AviaHelper::get_registered_sidebars();
     if (empty($params['args']['widget_area'])) {
         $params['args']['widget_area'] = reset($sidebars);
     }
     $element = array('subtype' => $sidebars, 'type' => 'select', 'std' => htmlspecialchars_decode($params['args']['widget_area']), 'class' => 'avia-recalc-shortcode', 'data' => array('attr' => 'widget_area'));
     $inner = "<img src='" . $this->config['icon'] . "' title='" . $this->config['name'] . "' />";
     $inner .= "<div class='avia-element-label'>" . $this->config['name'] . "</div>";
     $inner .= AviaHtmlHelper::render_element($element);
     $params['class'] = "";
     $params['content'] = NULL;
     $params['innerHtml'] = $inner;
     return $params;
 }
开发者ID:erikdukker,项目名称:medisom,代码行数:25,代码来源:widgetarea.php

示例2: editor_element

 /**
  * Editor Element - this function defines the visual appearance of an element on the AviaBuilder Canvas
  * Most common usage is to define some markup in the $params['innerHtml'] which is then inserted into the drag and drop container
  * Less often used: $params['data'] to add data attributes, $params['class'] to modify the className
  *
  *
  * @param array $params this array holds the default values for $content and $args. 
  * @return $params the return array usually holds an innerHtml key that holds item specific markup.
  */
 function editor_element($params)
 {
     //fetch all registered slides and save them to the slides array
     $slides = avia_find_layersliders(true);
     if (empty($params['args']['id']) && is_array($slides)) {
         $params['args']['id'] = reset($slides);
     }
     $element = array('subtype' => $slides, 'type' => 'select', 'std' => $params['args']['id'], 'class' => 'avia-recalc-shortcode', 'data' => array('attr' => 'id'));
     $inner = "<img src='" . $this->config['icon'] . "' title='" . $this->config['name'] . "' />";
     if (empty($slides)) {
         $inner .= "<div><a target='_blank' href='" . admin_url('admin.php?page=layerslider') . "'>" . __('No Layer Slider Found. Click here to create one', 'avia_framework') . "</a></div>";
     } else {
         $inner .= "<div class='avia-element-label'>" . $this->config['name'] . "</div>";
         $inner .= AviaHtmlHelper::render_element($element);
         $inner .= "<a target='_blank' href='" . admin_url('admin.php?page=layerslider') . "'>" . __('Edit Layer Slider here', 'avia_framework') . "</a>";
     }
     $params['class'] = "av_sidebar";
     $params['content'] = NULL;
     $params['innerHtml'] = $inner;
     return $params;
 }
开发者ID:erynet,项目名称:SUAWEBv2,代码行数:30,代码来源:slideshow_layerslider.php


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