Example #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);
 }
Example #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);
 }
Example #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);
 }
Example #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);
 }
Example #5
0
 public function __construct($title = '')
 {
     parent::__construct();
     if ($title) {
         $this->setOption('title', $title);
     }
     $this->addSemanticType('panel');
 }
Example #6
0
File: Tab.php Project: gsouf/uform
 public function __construct($title = null)
 {
     parent::__construct($title);
     $this->setOption('title', $title);
     $this->addSemanticType('tab');
 }