Exemplo n.º 1
0
 public function getOptionsType(BuilderInterface $builder, Field $entity, $data)
 {
     $type = $this->get('form.factory')->createNamedBuilder(sprintf("options-%d", $entity->getId()), Type\FormType::class, $data, ['translation_domain' => 'geny']);
     foreach ($builder->supportsOptions($entity) as $optionClass) {
         $option = $this->getCachedObject($optionClass);
         $option->build($type, $entity, $data);
     }
     return $type->getForm();
 }