public function addChild(\blaze\web\component\UIComponent $child) { if ($this->header == null && $child instanceof DataTableHeader) { return $this->header = $child->setParent($this); } else { if ($this->footer == null && $child instanceof DataTableFooter) { return $this->footer = $child->setParent($this); } else { return parent::addChild($child); } } }
public function addChild(\blaze\web\component\UIComponent $child) { if ($child instanceof html\SelectItem || $child instanceof html\SelectItems) { $this->items[] = $child->setParent($this); return $this; } else { // Not possible because of XSD //return parent::addChild($child); throw new \blaze\lang\IllegalArgumentException(); } }
public function addChild(\blaze\web\component\UIComponent $child) { $this->children[] = $child->setParent($this); return $this; }