By jessebeach on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.x
Issue links:
Description:
Due to changes in #2099131: Use #pre_render pattern for entity render caching, the signatures of the following hooks have changed:
hook_ENTITY_TYPE_viewhook_entity_view
Before
function hook_entity_view(\Drupal\Core\Entity\Entity $entity, \Drupal\Core\Entity\Display\EntityViewDisplayInterface $display, $view_mode, $langcode) {}
After
function hook_entity_view(array &$build, \Drupal\Core\Entity\Entity $entity, \Drupal\Core\Entity\Display\EntityViewDisplayInterface $display, $view_mode, $langcode) {}
For further details in specific entity API files, see
- https://api.drupal.org/api/drupal/core%21modules%21system%21entity.api.p...
- https://api.drupal.org/api/drupal/core%21modules%21node%21node.api.php/8
- https://api.drupal.org/api/drupal/core%21modules%21user%21user.api.php/8
- https://api.drupal.org/api/drupal/core%21modules%21comment%21comment.api...
- https://api.drupal.org/api/drupal/core%21modules%21taxonomy%21taxonomy.a...
Impacts:
Module developers
Themers