. */ declare(strict_types=1); namespace App\Form\AdminPages; use App\Entity\Base\AbstractNamedDBElement; use App\Form\Type\MasterPictureAttachmentType; use Symfony\Component\Form\FormBuilderInterface; class FootprintAdminForm extends BaseEntityAdminForm { public function additionalFormElements(FormBuilderInterface $builder, array $options, AbstractNamedDBElement $entity): void { $builder->add('footprint_3d', MasterPictureAttachmentType::class, [ 'required' => false, 'disabled' => !$this->security->isGranted(null === $entity->getID() ? 'create' : 'edit', $entity), 'label' => 'footprint.edit.3d_model', 'filter' => '3d_model', 'entity' => $entity, ]); } }