$e->createQueryBuilder('b')->orderBy('b.name', 'ASC'); $builder ->add('gpuBrand', EntityType::class, [ 'class' => Brand::class, 'query_builder' => $brandQueryBuilder, ]) ->add('modelName') ->add('gpuCore', EntityType::class, [ 'class' => GpuCore::class, 'query_builder' => static fn (EntityRepository $e) => $e->createQueryBuilder('gc')->orderBy('gc.brand', 'ASC')->orderBy('gc.name', 'ASC'), 'placeholder' => 'Unknown', 'empty_data' => NULL, 'required' => false, ]) ->add('boardBrand', EntityType::class, [ 'class' => Brand::class, 'query_builder' => $brandQueryBuilder, 'empty_data' => NULL, 'placeholder' => 'Unknown', 'required' => false, ]) ->add('alternateModelName') ->add('cardKey', EnumType::class, [ 'class' => SlotKeyEnum::class, 'choices' => SlotKeyEnum::getGroups(), 'choice_label' => fn (\UnitEnum $choice):string => $choice->value, ]) ->add('busInterface') ->add('slotWidth') ->add('molexPower', null, ['label' => 'Molex Power Connectors']) ->add('pcie6power', null, ['label' => 'PCIe 6-pin Power Connectors']) ->add('pcie8power', null, ['label' => 'PCIe 8-pin Power Connectors']) ->add('tdp', null, ['label' => 'TDP (Watts)', 'empty_data' => '0']) ->add('baseClock', null, ['label' => 'GPU Base Clock (MHz)']) ->add('boostClock', null, ['label' => 'GPU Boost Clock (MHz)']) ->add('memoryClock', null, ['label' => 'Memory Speed (MHz)']) ->add('memorySize', null, ['label' => 'Memory Size (MB)']) ->add('memoryBus', null, ['label' => 'Memory Bus Size (bits)']) ->add('memoryType') ->add('shadingUnits') ->add('tmus', null, ['label' => 'TMUs']) ->add('rops', null, ['label' => 'ROPs']) ->add('computeUnits') ->add('l1cache', null, ['label' => 'L1 Cache']) ->add('l2cache', null, ['label' => 'L2 Cache']) ->add('directXSupport', null, ['label' => 'DirectX Support']) ->add('openGLSupport', null, ['label' => 'OpenGL Support']) ->add('openCLSupport', null, ['label' => 'OpenCL Support']) ->add('vulkanSupport') ->add('shaderModel') ->add('link') ->add('count') ->add('acquired') ->add('notes'); } public function configureOptions(OptionsResolver $resolver): void { $resolver->setDefaults([ 'data_class' => Gpu::class, ]); } }