本文整理汇总了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);
}
示例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>';
}
}
示例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>';
}
}
示例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);
}
示例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();
}
}
示例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);
}
示例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();
}
示例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>';
}
}
示例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();
}
示例10: render
public function render()
{
return parent::render();
}
示例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;
}