src/FormElements/Service/Factory.php
protected function prepareAndInjectElements($elements, FieldsetInterface $fieldset, $method)
    {
        $elements = $this->validateSpecification($elements, $method);

        foreach ($elements as $elementSpecification) {
            if (null === $elementSpecification) {
                continue;
            }

            $fieldset->add($elementSpecification);
        }
    }
protected function prepareAndInjectElements($elements, FieldsetInterface $fieldset, $method)
    {
        $elements = $this->validateSpecification($elements, $method);

        foreach ($elements as $elementSpecification) {
            if (null === $elementSpecification) {
                continue;
            }

            $fieldset->add($elementSpecification);
        }
    }
Takes a list of element specifications, creates the elements, and injects them into the provided fieldset

@param  array|Traversable|ArrayAccess $elements
@param  FieldsetInterface $fieldset
@param  string $method Method invoking this one (for exception messages)
@return void