示例#1
0
 /**
  * Construct.
  *
  * @param array $attributes Html attributes.
  * @param bool  $vertical   If true a vertical button group is created.
  */
 public function __construct(array $attributes = array(), $vertical = false)
 {
     parent::__construct($attributes);
     if ($vertical) {
         $this->addClass('btn-group-vertical');
     } else {
         $this->addClass('btn-group');
     }
     $this->setAttribute('role', 'group');
 }
示例#2
0
 /**
  * Construct.
  *
  * @param array $attributes Toolbar attributes.
  */
 public function __construct(array $attributes = array())
 {
     parent::__construct($attributes);
     $this->addClass('btn-toolbar');
     $this->setAttribute('role', 'toolbar');
 }
示例#3
0
 /**
  * Construct.
  *
  * @param array $attributes Html attributes.
  */
 public function __construct(array $attributes = array())
 {
     parent::__construct($attributes);
     $this->addClass('btn-group');
 }
示例#4
0
 /**
  * @param Group $child
  * @return $this
  */
 public function addChild($child)
 {
     return parent::addChild($child);
 }