It would be nice to have the EntityFormWizardBase add a logging message whenever the entity is saved/updated just like \Drupal\Core\Entity\EntityDeleteFormTrait does.

Comments

Dave Reid created an issue. See original summary.

dave reid’s picture

Status: Active » Needs review
StatusFileSize
new1.63 KB

This adds the logging, and separates messages for new vs updated, as well as removing the handling of no success, since if the entity fails to save, an exception is thrown instead of no result.

joelpittet’s picture

StatusFileSize
new2.04 KB
new1.76 KB

This seems like a nice clean-up. I've done a bit of touch ups if these are ok with you I'm game to commit this?

  • Swapped out the deprecated drupal_set_message() with the injected logger
  • Fixed the PHPDoc comment on $entity and remove a line break.
dave reid’s picture

I would prefer to *not* remove drupal_set_message(), because it breaks compatibility with Drupal 8.4.

joelpittet’s picture

Status: Needs review » Fixed

Ah good catch, I didn't realize it was introduced in 8.5, we can wait on until 8.4.x is not supported (after 8.6 sometime)

I've committed this to the dev 3.x dev branch.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.