Esempio n. 1
0
 public function render()
 {
     if ($this->hasClass('alert-dismissible')) {
         $ariaLabelAttrib = $this->ariaLabel ? ' aria-label="' . $this->ariaLabel . '"' : '';
         $this->prepend('<button type="button" class="close" ' . 'data-dismiss="alert"' . $ariaLabelAttrib . '>' . '<span aria-hidden="true">&times;</span></button>');
     }
     return parent::render();
 }
Esempio n. 2
0
 /**
  * 
  * @param mixed $items
  * @param mixed $options
  */
 public function __construct($items = null, $options = null)
 {
     parent::__construct(new Ul());
     if ($items) {
         $this->setItems($items);
     }
     if ($options) {
         $this->tag->setOptions($options);
     }
     $this->tag->addClass('list-group');
 }
Esempio n. 3
0
 /**
  * 
  * @param mixed $items
  * @param mixed $options
  */
 public function __construct($items = null, $options = null)
 {
     parent::__construct(new Ol());
     if ($items) {
         $this->setItems($items);
     }
     if ($options) {
         $this->tag->setOptions($options);
     }
     $this->tag->addClass('breadcrumb');
 }
Esempio n. 4
0
 /**
  * 
  * @param mixed $button
  * @param array $items
  * @param mixed $options
  */
 public function __construct($button, array $items = null, $options = null)
 {
     parent::__construct(new Tag('div', ''));
     $this->down();
     $this->setButton($button);
     $this->ul = new Ul('', ['class' => 'dropdown-menu', 'role' => 'menu']);
     if ($items) {
         $this->setItems($items);
     }
     if ($options) {
         $this->tag->setOptions($options);
     }
 }
Esempio n. 5
0
 public function render()
 {
     if ($this->body !== null) {
         $this->prepend($this->body);
     }
     if ($this->heading !== null) {
         $this->prepend($this->heading);
     }
     if ($this->footer !== null) {
         $this->append($this->footer);
     }
     return parent::render();
 }
Esempio n. 6
0
 /**
  * 
  * @param int $pages
  * @param mixed $options
  */
 public function __construct($pages, $options = null)
 {
     $href = '';
     if ($options && is_string($options)) {
         $href = $options;
         $options = null;
     }
     $this->nav = new Tag('nav', '', $options);
     parent::__construct(new Ul());
     $this->tag->addClass('pagination');
     $this->pages($pages);
     $this->href($href);
 }
Esempio n. 7
0
 /**
  * 
  * @param string $id
  * @param array $items
  * @param mixed $options
  */
 public function __construct(array $items = null, $options = null)
 {
     if (is_string($options)) {
         $options = ['id' => $options];
     }
     parent::__construct(new Tag('div', '', $options));
     $this->tag->addClass('carousel');
     $this->tag->addClass('slide');
     $this->tag->data('ride', 'carousel');
     $this->indicators = new Ol(null, ['class' => 'carousel-indicators']);
     $this->inner = new Tag('div', ['class' => 'carousel-inner', 'role' => 'listbox']);
     if ($items) {
         $this->setItems($items);
     }
 }
Esempio n. 8
0
 /**
  * 
  * @param mixed $items
  * @param array $options
  */
 public function __construct($items = null, $options = null)
 {
     if ($options && is_string($options)) {
         $id = $options;
         $options = ['id' => $id];
     }
     $this->navbarContainer = new Tag('div', '', ['class' => 'container-fluid']);
     $this->navbarHeader = new Tag('div', '', ['class' => 'navbar-header']);
     $this->navbarCollapse = new Tag('div', '', ['class' => 'collapse navbar-collapse']);
     if (isset($options['id'])) {
         $this->navbarCollapse->id($options['id']);
         unset($options['id']);
     }
     parent::__construct(new Tag('nav', '', ['class' => 'navbar navbar-default']));
     if ($items) {
         $this->setItems($items);
     }
     if ($options) {
         $this->tag->setOptions($options);
     }
 }
Esempio n. 9
0
 /**
  * 
  * @param string $body
  * @param array $options
  */
 public function __construct($body = '', $options = null)
 {
     $header = '';
     if ($options && is_string($options)) {
         $header = $options;
         $options = [];
     }
     if (isset($options['header'])) {
         $header = $options['header'];
         unset($options['header']);
     }
     $this->modalDialog = new Tag('div', '', ['class' => 'modal-dialog']);
     $this->modalContent = new Tag('div', '', ['class' => 'modal-content']);
     $this->modalHeader = new Tag('div', '', ['class' => 'modal-header']);
     $this->modalBody = new Tag('div', '', ['class' => 'modal-body']);
     $this->modalFooter = new Tag('div', '', ['class' => 'modal-footer']);
     parent::__construct(new Tag('div', $body, $options));
     $this->tag->addClass('modal');
     $this->tag->setAttrib('role', 'dialog');
     $this->tag->aria('hidden', 'true');
     $this->fade(true);
     $this->header($header);
 }
Esempio n. 10
0
 public function render()
 {
     $this->tag->prepend($this->h1);
     return parent::render();
 }