In #1499596: Introduce a basic entity form controller we unified the generation of entity forms but the actions associated to the various entity-specific forms still need to be unfied and the related code moved to the base implementation. We need some discussion about the preview action, which is available in a couple of entity types (comment and node) only: it might make sense to move preview code to the base implementation if it can be generalized enough.

Comments

tim.plunkett’s picture

Would this also be the issue for

  public function save(array $form, array &$form_state) {
    // @todo Perform common save operations.
  }
  public function delete(array $form, array &$form_state) {
    // @todo Perform common delete operations.
  }

?

plach’s picture

Yes, definitely so.

andypost’s picture

Also most of core entities use confirmation of delete, so base controller should care about that

plach’s picture

Yes

andypost’s picture

It seem that we could close this in favor of #1839516: Introduce entity operation providers

Berdir’s picture