/** * {@inheritdoc} */ public function render() { if ($this->isDismissible()) { $content = $this->getContent(); $this->setContent('<button type="button" class="close" data-dismiss="alert" aria-label="Close">' . '<span aria-hidden="true">×</span></button>' . $content); } $return = parent::render(); if (isset($content)) { $this->setContent($content); } return $return; }
/** * {@inheritdoc} */ public function render() { if ($this->responsive) { $div = new HtmlElement('<div>'); $div->addClass('table-responsive'); $div->setContent(parent::render()); return $div->render(); } else { return parent::render(); } }
/** * {@inheritdoc} */ public function render() { $this->ul->clear(); $this->ul->add($this->getLi(max(1, $this->current - 1), '«')->addClass('prev')); $min = 1; $max = $this->page; if ($this->page > $this->maxItem) { $min = max(1, $this->current - $this->maxItem / 2); $max = min($this->page, $this->current + $this->maxItem / 2); } if ($min - 1 >= 1) { $this->ul->add($this->getLi($min + 1, '...')); } for ($i = $min; $i <= $max; $i++) { $this->ul->add($this->getLi($i)); } if ($max + 1 < $this->page) { $this->ul->add($this->getLi($max + 1, '...')); } $this->ul->add($this->getLi(min($this->page, $this->current + 1), '»')->addClass('next')); $this->setContent($this->ul->render()); return parent::render(); }
/** * {@inheritdoc} */ public function render() { if (!isset($this->data['id'])) { $this->generateId(); } $this->data['content'] = $this->elements->render(); $phtml = $this->phtmlRender(); if ($this->isStaticToTop()) { $phtml = (new HtmlElement('<div>'))->addClass('container')->setContent($phtml)->render(); } $this->setContent($phtml); $return = parent::render(); return $return; }
/** * {@inheritdoc} */ public function render() { $this->addAttribute('src', $this->getUrl()); return parent::render(); }
/** * {@inheritdoc} */ public function render() { $this->build(); $this->setContent($this->header->render()); return HtmlElement::render(); }
/** * {@inheritdoc} */ public function render() { $this->content = $this->layout()->render(); return parent::render(); }
/** * {@inheritdoc} */ public function render() { $this->build(); $this->setContent($this->header->render() . $this->body->render()); return parent::render(); }
/** * @return string */ public function render() { $this->element->setContent(json_encode($this->data)); return $this->element->render(); }