EasyCorp / EasyCorp/EasyAdminBundle
Allow reading of processed form in CrudController
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 4.3k
- Forks
- 1.1k
- Avg merge
- 8d 2h
- Merged PRs (30d)
- 11
Description
Currently it is impossible to read anything from the form, as the controller does not pass it to any events or protected functions. It's simply read, processed and discarded.
Short description of what this feature will allow to do:
Allow custom processing of forms in edit/new actions.
Example of how to use this feature
if ($newForm->isSubmitted() && $newForm->isValid()) {
$this->processUploadedFiles($newForm);
$this->processNewForm($newForm);
We could use it in our application as it does things EA really doesn't allow by default (injecting entities dynamically in subforms, main forms, etc.) right now I need to override the new method and manually look for the submit button, then find the values I passed (without processing from form), you can see how it's annoying.
It wouldn't be a lot of work either, since it's just 2 methods, that return void and do nothing by default.
If accepted I could prepare the MR for it too.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading CrudController and tracing how the edit and new actions process forms before discarding them. Check the events and protected functions involved in those actions. Done means custom processing can access the processed form in both flows without overriding the actions; add coverage for the two methods if the existing test structure identifies a suitable location.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, symfony
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100