コード例 #1
0
ファイル: GroupElement.php プロジェクト: torbenkoehn/php-xtpl
 public function __construct(array $attributes = array())
 {
     parent::__construct($attributes);
     $this->addClass('btn-group');
     $this->ignoreAttribute(array('SIZE', 'TYPE'));
     if ($this->hasAttribute('SIZE')) {
         $size = $this->getAttribute('SIZE');
         switch ($size) {
             case 'large':
             case 'lg':
                 $this->addClass('btn-group-lg');
                 break;
             case 'small':
             case 'sm':
                 $this->addClass('btn-group-sm');
                 break;
             case 'extra-small':
             case 'xs':
                 $this->addClass('btn-group-xs');
                 break;
         }
     }
     if ($this->hasAttribute('TYPE')) {
         $size = $this->getAttribute('TYPE');
         switch ($size) {
             case 'vertical':
                 $this->removeClass('btn-group');
                 $this->addClass('btn-group-vertical');
                 break;
             case 'justified':
                 $this->addClass('btn-group-justified');
                 break;
         }
     }
 }
コード例 #2
0
ファイル: BarElement.php プロジェクト: torbenkoehn/php-xtpl
 public function process()
 {
     if (!$this->isProcessed()) {
         if (!$this->getParent() instanceof ProgressElement) {
             $pe = new ProgressElement();
             $this->getParent()->insertBefore($this, $pe);
             $pe->addChild($this);
         }
     }
     return parent::process();
 }
コード例 #3
0
 public function __construct(array $attributes = array())
 {
     parent::__construct($attributes);
     $this->addClass('table-responsive');
 }
コード例 #4
0
 public function __construct(array $attributes = array())
 {
     parent::__construct($attributes);
     $this->addClass('btn-toolbar');
     $this->setAttribute('ROLE', 'toolbar');
 }
コード例 #5
0
ファイル: GroupElement.php プロジェクト: torbenkoehn/php-xtpl
 public function __construct(array $attributes = array())
 {
     parent::__construct($attributes);
     $this->addClass('panel-group');
 }
コード例 #6
0
 public function __construct(array $attributes = array())
 {
     parent::__construct($attributes);
     $this->addClass('page-header');
 }