Esempio n. 1
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. 2
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. 3
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. 4
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. 5
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. 6
0
 /**
  * 
  * @param mixed $content
  * @param mixed $options
  */
 public function __construct($content, $options = null)
 {
     $smallContent = null;
     if ($options && is_string($options)) {
         $smallContent = $options;
         $options = [];
     }
     if (isset($options['smallContent'])) {
         $smallContent = $options['smallContent'];
         unset($options['smallContent']);
     }
     $this->setH1Content($content, $smallContent);
     parent::__construct(new Tag('div', '', $options));
     $this->tag->addClass('page-header');
 }
Esempio n. 7
0
 /**
  * 
  * @param mixed $body
  * @param mixed $options
  */
 public function __construct($body = null, $options = null)
 {
     $this->setBody($body);
     if ($options && is_string($options)) {
         $options = ['heading' => $options];
     }
     if (isset($options['heading'])) {
         $this->setHeading($options['heading']);
         unset($options['heading']);
     }
     if (isset($options['footer'])) {
         $this->setFooter($options['footer']);
         unset($options['footer']);
     }
     parent::__construct(new Tag('div', '', $options));
     $this->tag->addClass('panel');
     $this->tag->addClass('panel-default');
 }
Esempio n. 8
0
 /**
  * 
  * @param mixed $content
  * @param mixed $options
  */
 public function __construct($content = '', $options = null)
 {
     $alertStyle = null;
     if ($options && is_string($options)) {
         $alertStyle = $options;
         $options = [];
     }
     $dismissible = false;
     if (isset($options['dismissible']) && $options['dismissible']) {
         $dismissible = $options['dismissible'];
         unset($options['dismissible']);
     }
     $options['role'] = 'alert';
     parent::__construct(new Tag('div', $content, $options));
     $this->tag->addClass('alert');
     $this->alertStyle($alertStyle);
     if ($dismissible) {
         $this->dismissible($dismissible);
     }
 }
Esempio n. 9
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. 10
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);
 }