/** * * @param string $name * Name of the input element that will make it identifiable * @param array $specs * Specification for the element (attributes, parents, etc) */ public function __construct($name, $specs = array()) { $specs = array_merge($this->getDefaultSpecs(), $specs); parent::__construct($name, $specs); }
/** * Make sure a Group type element is added to the children if the element has a group * * @param Element $element */ protected function ensureGroupExists(Element $element) { if (!$element->getGroup() || $this->hasElement($element->getGroup())) { return; } $this->addElement($element->getGroup(), array(Specs::TYPE => 'group', Specs::POSITION => $element->getPosition())); }