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


PHP Element::render方法代码示例

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


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

示例1: render

 public function render($nice = false, $level = 0)
 {
     if ($this->display) {
         return parent::render();
     }
     return $this->renderChildren($nice, $level);
 }
开发者ID:torbenkoehn,项目名称:php-xtpl,代码行数:7,代码来源:RadioElement.php

示例2: render

 public function render()
 {
     $addons = array();
     if (!empty($this->prepend)) {
         $addons[] = "input-prepend";
     }
     if (!empty($this->append)) {
         $addons[] = "input-append";
     }
     if (!empty($addons)) {
         echo '<div class="', implode(" ", $addons), '">';
     }
     $suffix = mt_rand(1, 500);
     $this->renderSortable('start', $suffix);
     for ($i = 0; $i <= $_SERVER['RM_COUNTER']; $i++) {
         $this->renderSortable("prepend", $suffix);
         $this->renderAddOn("prepend", $suffix);
         parent::render();
         if (!empty($this->others)) {
             $this->renderOthers($this->others, $i);
         }
         $this->renderAddOn("append", $suffix);
         $this->renderSortable("append", $suffix);
     }
     $this->renderSortable('close', $suffix);
     $this->renderSortable('add_action', $suffix);
     $this->renderSortable('extra_option', $suffix);
     if (!empty($addons)) {
         echo '</div>';
     }
 }
开发者ID:developmentDM2,项目名称:The-Haute-Mess,代码行数:31,代码来源:Textboxsortable.php

示例3: render

 public function render()
 {
     $addons = array();
     if (!empty($this->prepend)) {
         $addons[] = "input-prepend";
     }
     if (!empty($this->append)) {
         $addons[] = "input-append";
     }
     if (!empty($addons)) {
         echo '<div class="', implode(" ", $addons), '">';
     }
     if (substr($this->_attributes["name"], -2) != "[]") {
         $this->_attributes["name"] .= "[]";
     }
     $this->renderRepeatable('start');
     for ($i = 0; $i <= $_SERVER['RM_COUNTER']; $i++) {
         $this->renderRepeatable("prepend");
         $this->renderAddOn("prepend");
         parent::render();
         $this->renderAddOn("append");
         $this->renderRepeatable("append");
     }
     $this->renderRepeatable('close');
     if (!empty($addons)) {
         echo '</div>';
     }
 }
开发者ID:developmentDM2,项目名称:The-Haute-Mess,代码行数:28,代码来源:Repeatable.php

示例4: render

 public function render($nice = false, $level = 0)
 {
     if ($this->getParent()->hasAttribute('DATA-TOGGLE') && $this->getParent()->getAttribute('DATA-TOGGLE') == 'tab') {
         return $this->renderChildren($nice, $level);
     }
     return parent::render($nice, $level);
 }
开发者ID:torbenkoehn,项目名称:php-xtpl,代码行数:7,代码来源:TitleElement.php

示例5: s_element_replace

function s_element_replace(array $matches)
{
    if (isset($matches[1])) {
        $dD = new DataStore();
        $o_Element = new Element($dD->get_element_data($matches[1]));
        $o_Element->_set_full_element($dD->o_get_full_element($matches[1]));
        return $o_Element->render();
    }
}
开发者ID:Divian,项目名称:flot,代码行数:9,代码来源:items.php

示例6: render

 public function render($nice = false, $level = 0)
 {
     if ($this->hasAttribute('NAME')) {
         //render only the children, since this is the var-command, not the HTML tag
         return $this->renderChildren($nice, $level);
     }
     //else we just render the normal var-tag
     return parent::render($nice, $level);
 }
开发者ID:torbenkoehn,项目名称:php-xtpl,代码行数:9,代码来源:VarElement.php

示例7: render

 public function render()
 {
     $multiple = get_option('rm_option_allow_multiple_file_uploads');
     if ($multiple == "yes") {
         $this->_attributes['multiple'] = "multiple";
         $this->_attributes['name'] = $this->_attributes['name'] . '[]';
     }
     if ($this->isRequired()) {
         $this->validation[] = new Validation_File("", true);
     } else {
         $this->validation[] = new Validation_File();
     }
     parent::render();
 }
开发者ID:developmentDM2,项目名称:What-The-Flicka,代码行数:14,代码来源:File.php

示例8: render

 public function render()
 {
     $addons = array();
     if (!empty($this->prepend)) {
         $addons[] = "input-prepend";
     }
     if (!empty($this->append)) {
         $addons[] = "input-append";
     }
     if (!empty($addons)) {
         echo '<div class="', implode(" ", $addons), '">';
     }
     $this->renderAddOn("prepend");
     parent::render();
     $this->renderAddOn("append");
     if (!empty($addons)) {
         echo '</div>';
     }
 }
开发者ID:developmentDM2,项目名称:The-Haute-Mess,代码行数:19,代码来源:Textbox.php

示例9: element

 public function element($elementName, array $data = array())
 {
     class_exists('Element') or (require dirname(__FILE__) . '/Element.php');
     $subView = new Element($elementName, array_merge($this->data, $data));
     return $subView->render();
 }
开发者ID:holdensmagicalunicorn,项目名称:franklin,代码行数:6,代码来源:View.php

示例10: render

 public function render()
 {
     return parent::render();
 }
开发者ID:Niloofareyjey,项目名称:ellie-ui,代码行数:4,代码来源:Form.php

示例11: videoReplace

    public function videoReplace($text)
    {
        // get normal videos
        if (preg_match_all('@\\[{2}
			video=([^|]+)
			\\|?(\\d+)?
			\\|?([^\\]]+)?
			\\]{2}@ix', $text, $found, PREG_SET_ORDER)) {
            foreach ($found as $arr) {
                $videoUrl = WEBROOT . STATIC_DIR . 'swf/VideoPlayer.swf?url=' . $arr[1] . '&name=' . urlencode(@$arr[3]);
                $videoTag = $this->HTML->tag('embed', null, array('src' => $videoUrl, 'allowFullScreen' => 'true', 'type' => 'application/x-shockwave-flash', 'width' => 440, 'height' => coalesce(@$arr[2], 440)));
                $text = str_replace($arr[0], $videoTag, $text);
            }
        }
        // get dailymotion / youtube videos
        if (preg_match_all('@\\[{2}
			(?:http:\\/{1,}(?:www\\.)?)?
			(?P<type>youtube|dailymotion|vimeo|traileraddict)=?
				 (
					(\\.com\\/(video\\/|watch\\?v=)|:)?
					(?P<id>[a-z0-9_-]+)
				)
				([^\\]]+)?
			\\]{2}@ix', $text, $found, PREG_SET_ORDER)) {
            foreach ($found as $arr) {
                class_exists('Element') or Library::load('ephFrame.lib.view.Element');
                $videoElement = new Element('video/' . $arr['type'], array('id' => $arr['id']));
                $text = str_replace($arr[0], $videoElement->render(), $text);
            }
        }
        return $text;
    }
开发者ID:Ephigenia,项目名称:harrison,代码行数:32,代码来源:BlogPostFormater.php


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