Пример #1
0
 /**
  * Adds a column to the group. Column can only receive column as child.
  * @param Element $element
  */
 public function addElement(Element $element)
 {
     if (!$element instanceof Column) {
         throw new InvalidArgumentException('element', 'Instance of Column', $element, 'Cant add non-column element into columnGroup');
     }
     parent::addElement($element);
 }
Пример #2
0
 public function addElement(Element $element)
 {
     if (!$element instanceof Tab) {
         throw new InvalidArgumentException('element', 'Instance of Tab', $element, 'Cannot add non-tab element into TabGroup');
     }
     parent::addElement($element);
 }
Пример #3
0
 public function addElement(Element $element)
 {
     if (!$element instanceof Element\Primary) {
         throw new InvalidArgumentException('element', 'Instance of Primary', $element, 'Cant add non-primary element into an inline group');
     }
     parent::addElement($element);
 }
Пример #4
0
 /**
  * @inheritdoc
  */
 public function setParent(Container $parent)
 {
     if (!$parent instanceof ColumnGroup) {
         throw new Exception('The column parent must be a column group');
     }
     return parent::setParent($parent);
 }
Пример #5
0
 public function __construct($title = '')
 {
     parent::__construct();
     if ($title) {
         $this->setOption('title', $title);
     }
     $this->addSemanticType('panel');
 }
Пример #6
0
 public function __construct($title = null)
 {
     parent::__construct($title);
     $this->setOption('title', $title);
     $this->addSemanticType('tab');
 }