You are here

function pathauto_entity_module_implements_alter in Pathauto Entity 7

Implements hook_module_implements_alter().

File

./pathauto_entity.module, line 38
Implements custom entity type support for Pathauto module.

Code

function pathauto_entity_module_implements_alter(&$implementations, $hook) {

  // Both this module and file_entity implement hook_path_alias_types() and
  // provide an object for 'file' entity type, which then generates nested array
  // in module_invoke_all(), which uses array_merge_recursive(). To avoid this,
  // let's keep only implementation from this module (as it is more generic),
  // and get rid of file_entity module implementation.
  if ($hook == 'path_alias_types' && isset($implementations['file_entity'])) {
    unset($implementations['file_entity']);
  }
}