public function addParsedObject($object) { if ($object instanceof TDataGridColumn) { $this->getColumns()->add($object); } else { parent::addParsedObject($object); } // this is needed by EmptyTemplate }