https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Entity!EntityStor...
The invokeHook() method on EntityStorageBase is passing the entity type into the CRUD hooks.
This is not necessary, since $entity (also being passed in) has the type on it. Also, it isn't documented in the hook docs, and no implementation is expecting it.
So, let's remove it. (Note: This was suggested by Berdir in IRC; see also #2216535-15: Replace Node overview topic and Node API topic with Entity Hooks topic and following comment that will be there as soon as I file this issue.
I'll make a one-line patch and attach as soon as I get this issue filed so I have a node ID to name the patch file.
Comment | File | Size | Author |
---|---|---|---|
#1 | 2295229-entity-invoke.patch | 691 bytes | jhodgdon |
Comments
Comment #1
jhodgdonComment #2
jhodgdonComment #3
jhodgdonComment #4
BerdirI'm pretty sure this was accidently re-introduced by a refactoring or something.
We did remove this and we documented it here: https://www.drupal.org/node/1637540. So let's remove it again, nobody knows we still do this (I didn't).
Comment #5
jhodgdonPlus, removing it did not cause any test failures. :) Always a good thing.
Comment #6
alexpottCommitted bf7b017 and pushed to 8.x. Thanks!