1 path.module path_entity_load($entities, $type)

Implements hook_entity_load().

File

core/modules/path/path.module, line 421
Enables users to customize URLs and provide automatic URL alias patterns.

Code

function path_entity_load($entities, $type) {
  static $path_entity_types;

  // Compile the list of supported entity types.
  if (!isset($path_entity_types)) {
    $path_entity_types = array();
    $all_path_info = path_get_info();
    foreach ($all_path_info as $path_info) {
      if (isset($path_info['entity type'])) {
        $path_entity_types[] = $path_info['entity type'];
      }
    }
  }

  // Modify the entity if supported to include canonical path information.
  if (in_array($type, $path_entity_types)) {
    path_load_multiple_by_entities($entities);
  }
}