/** * @return Form */ final function addComponent(FormComponent $object) { Assert::isTrue(isset($this->components[$object->GetName()]), sprintf('Duplicate form element %s with %s name', get_class($object), $object->getName())); $this->components[$object->getName()] = $object; return $this; }