Resolve difference between submitForm(), submit(), and save() in EntityFormController

Created on 19 June 2013, over 11 years ago
Updated 12 September 2023, about 1 year ago

Updated: Comment #12

When EntityFormController was first written, it had both submit() and save() methods, and they were attached directly to each button.
Then when EntityFormController was moved to implement FormInterface, it gained a submitForm() method.

Proposal

We tried moving all submit and save logic to submitForm(), and remove save() and submit() but this did not work because preview and save often require common code to run before they work. For an example see CommentFormController.

The current approach is to remove submit() and refactor into save() and submitForm() where appropriate. This means that for entity confirm forms the actions have been changed to not call the save() submit handler and only call submitForm().

πŸ“Œ Task
Status

Fixed

Version

8.0 ⚰️

Component
EntityΒ  β†’

Last updated about 9 hours ago

Created by

πŸ‡ΊπŸ‡ΈUnited States tim.plunkett Philadelphia

Live updates comments and jobs are added and updated live.
  • API change

    Changes an existing API or subsystem. Not backportable to earlier major versions, unless absolutely required to fix a critical bug.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024