getAttributes() as $attribute) { $annotations[] = $attribute->newInstance(); } $this->configureForm($annotations, $reflection, $formSpec, $filterSpec); foreach ($reflection->getProperties() as $property) { $annotations = new AnnotationCollection(); foreach ($property->getAttributes() as $attribute) { $annotations[] = $attribute->newInstance(); } $this->configureElement($annotations, $property, $formSpec, $filterSpec); } return [$formSpec, $filterSpec]; } }