Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Doc] Add an example of custom CRUD action #6300

Open
alexislefebvre opened this issue May 17, 2024 · 0 comments
Open

[Doc] Add an example of custom CRUD action #6300

alexislefebvre opened this issue May 17, 2024 · 0 comments

Comments

@alexislefebvre
Copy link
Contributor

alexislefebvre commented May 17, 2024

On this section: https://symfony.com/bundles/EasyAdminBundle/current/actions.html#adding-custom-actions

There is an example of code:

public function renderInvoice(AdminContext $context)
{
    $order = $context->getEntity()->getInstance();

    // add your logic here...
}

What is the expected logic? Must I return an instance of Symfony\Component\HttpFoundation\Response?

It would be nice to have a real example.

So far, returning a Response work but it isn't in the context of this admin so that looks weird.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant