Problem/Motivation
See #2449457-41: inconsistent checks in content_translation (comments 41 through 49). The hook_entity_alter() build docs say:
Do not use this hook to add information to entity types, unless you are just filling-in default values. Use hook_entity_type_build() instead.
That is incomplete information, however, since there are other circumstances where hook_entity_type_build() will not work as expected.
Proposed resolution
Expand the docs. Attached patch tries to clarify.
Beta phase evaluation
| Unfrozen changes | Unfrozen because it only changes documentation. |
|---|
Remaining tasks
This could use some review for technical accuracy.
User interface changes
N/A
API changes
N/A
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | interdiff_2478855_2-4.txt | 1.08 KB | jacobsanford |
| #4 | 2478855-hook_entity_type_build-4-8.0.x.patch | 1.81 KB | jacobsanford |
| #2 | hook_entity_type_build.patch | 1.78 KB | xjm |
Comments
Comment #2
xjmOops. Now without nonsense hunks from another interdiff.
Comment #3
jhodgdonLooks good!
Nitpick: list formatting. We normally end list items in . not , and do not put "or" in them as in this patch.
So I would suggest the line before the list say "... unless one of the following is true:", and then take out the , and or stuff.
Also each list item normally starts with a capital letter.
Comment #4
jacobsanfordChanges requested in #3 implemented.
I also removed the word 'just' from the first list item - it seemed redundant.
Comment #5
jhodgdonThanks, that looks fine to me.
Comment #6
alexpottCommitted 5a54339 and pushed to 8.0.x. Thanks!