當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。