You can overryde the create template and extend it from the base, remember
to send the user parameter. Then change the form URL in the extended base
view to execute an action to send the mail.
admin.multimedia:
class: AppBundle\Admin\MultimediaAdmin
arguments: [~, AppBundle\Entity\Multimedia, ~]
tags:
- { name: sonata.admin, manager_type: orm, label: Multimedia }
calls:
- [ setTemplate, [list,
AppBundle:Multimedia:multimedia_list.html.twig]]
with calls you can overryde the template and change what do you want.
Try it.
El lunes, 15 de mayo de 2017, 10:33:00 (UTC-6), Rob Tam escribió:
>
> Hello guys,
> I begin to use Sonata admin in memory of the old symfony admin generator.
> I remember that it was possible to redirect to another admin on a list
> action for instance.
>
> I want to set up a new list action that will redirect to another admin BUT
> this other admin should be pre filled with some datas
>
> ie: list action on user -> click -> open other admin 'mail' on the
> creation form -> mail form has a field user_id that should be set to the
> user linked on the first admin list.
>
> Is this possible with sonata ? Any clues on how to do this ?
>
> Thanks
>
--
You received this message because you are subscribed to the Google Groups
"sonata-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sonata-users.
For more options, visit https://groups.google.com/d/optout.