Change record status: 
Project: 
Introduced in branch: 
8.x
Description: 

In Drupal 7 and earlier, hook_node_load() received an additional argument with a list of node types that $nodes contained. Modules that only wanted to change specific node types could check that and stop processing early.

This resulted in a fair bit of additional complexity when invoking that hook, in most cases more code as it was necessary to check both $types and $nodes and did not provide a measurable performance improvement.

The argument and the ability to specify these arguments for an entity type have been dropped.

7.x

function mymodule_node_load($nodes, $types) {
  if (!in_array('my_node_type', $types)) {
    return;
  }
  foreach ($nodes as $node) {
    if ($node->type == 'my_node_type') {
      // Do something.
    }
  }
}

8.x

function mymodule_node_load($nodes) {
  foreach ($nodes as $node) {
    if ($node->getType() == 'my_node_type') {
      // Do something.
    }
  }
}
Impacts: 
Module developers
Updates Done (doc team, etc.)
Online documentation: 
Not done
Theming guide: 
Not done
Module developer documentation: 
Not done
Examples project: 
Not done
Coder Review: 
Not done
Coder Upgrade: 
Not done
Other: 
Other updates done