Example #1
0
 /**
  * 
  * @param string $name
  * @param array $options
  */
 public function __construct($name, $options = null)
 {
     $this->id("form_{$name}");
     $this->setName($name);
     $this->setValue('');
     parent::__construct($this->tag, $this->content, $options);
 }
Example #2
0
 /**
  * 
  * @param mixed $items
  * @param mixed $options
  */
 public function __construct($items = null, $options = null)
 {
     $this->items = new ArrayObject();
     if ($items) {
         $options['items'] = $items;
     }
     parent::__construct('dl', '', $options);
 }
Example #3
0
 /**
  * 
  * @param array $rows
  * @param mixed $options
  */
 public function __construct($rows = null, $options = null)
 {
     if ($rows) {
         $options['rows'] = $rows;
     }
     parent::__construct('table', '', $options);
     $this->addClass('table');
 }
Example #4
0
 /**
  * 
  * @param mixed $items
  * @param mixed $options
  */
 public function __construct($elements = null, $options = null)
 {
     $this->action('');
     $this->method('post');
     $this->enctype('');
     $this->clearElements();
     if ($elements) {
         $this->setElements($elements);
     }
     parent::__construct('form', '', $options);
 }
Example #5
0
 /**
  * 
  * @param string $content
  * @param mixed $options
  */
 public function __construct($content = '', $options = null)
 {
     $labelStyle = null;
     if ($options && is_string($options)) {
         $labelStyle = $options;
         $options = [];
     }
     $options['role'] = 'label';
     parent::__construct('span', $content, $options);
     $this->addClass('label');
     $this->labelStyle($labelStyle);
 }
Example #6
0
 /**
  * 
  * @param string $content
  * @param array $options
  */
 public function __construct($content = '', $options = null)
 {
     $size = null;
     if ($options && is_string($options)) {
         $size = $options;
         $options = [];
     }
     if (isset($options['size'])) {
         $size = $options['size'];
         unset($options['size']);
     }
     parent::__construct('div', $content, $options);
     $this->addClass('well');
     $this->size($size);
 }
 /**
  * 
  * @param int  $value
  * @param mixed $options
  */
 public function __construct($value = 0, $options = null)
 {
     $content = '';
     if ($options && is_string($options)) {
         $content = $options;
         $options = [];
     }
     $options['role'] = 'progressbar';
     $options['value'] = $value;
     if (!isset($options['min'])) {
         $options['min'] = 0;
     }
     if (!isset($options['max'])) {
         $options['max'] = 100;
     }
     parent::__construct('div', $content, $options);
     $this->addClass('progress-bar');
 }
Example #8
0
 /**
  * 
  * @param string $icon
  * @param mixed  $options
  */
 public function __construct($icon, $options = null)
 {
     parent::__construct('span', '', $options);
     $this->addClass('glyphicon');
     $this->setIcon($icon);
 }