Category : easyadmin

I have created a new action that allows to accept entities. The problem is the accept action button shows for all entites but I only want it to show for the inaccepted entites not the accepted ones. An accepted entity has the status 1 , the others status 0 here’s my configue actions method public ..

Read more

I’m new to easy Admin and Symfony and I’m trying to display a ManyToMany Column. I have my Answer Controller Configured like so: Each answer can have one commend added to it or one category public function configureFields(string $pageName): iterable { $fields = [ IdField::new(‘id’)->hideOnForm(), AssociationField::new(‘comment’), AssociationField::new(‘category’), ]; $answer = TextField::new(‘answer’)->setFormTypeOption(‘disabled’, ‘disabled’); if (in_array(BackendUser::ROLE_SUPER_ADMIN, $this->getUser()->getRoles())) ..

Read more

An error occurs when i try to edit an entity which has an image field defined in CRUD but no image uploaded on creation (empty field in database). Configurated fields : public function configureFields(string $pageName): iterable { $photo = ImageField::new(‘photo’); $photo->setUploadDir(‘public/uploads/files/’); $photo->setBasePath(‘/uploads/files/’); $photo->setUploadedFileNamePattern(‘[randomhash].[extension]’); $photo->setRequired(false); $date = TextField::new(‘date’); $text = TextareaField::new(‘text’); $id = IntegerField::new(‘id’, ‘ID’); if ..

Read more

I’m trying to generate EasyAdmin3 url inside my template with some params, but for some reason they are not present in a controller. Twig template: <a href="{{ ea_url().setRoute(‘route_name’).set(‘id’, 1) }}">xxx</a> <a href="{{ ea_url({‘routeName’: ‘route_name’, ‘id’:1}) }}">yyy</a> Error with missing EA context: <a href="{{ path(‘route_name’, {‘id’: 1}) }}">zzz</a> Controller: /** * @Route("/admin/something/{id}", name="rounte_name") */ public function ..

Read more