You are here

function farm_entity_module_implements_alter in farmOS 2.x

Implements hook_module_implements_alter().

File

modules/core/entity/farm_entity.module, line 20
Contains farm_entity.module.

Code

function farm_entity_module_implements_alter(&$implementations, $hook) {

  // Make sure this module's hook_entity_type_build() runs before the
  // entity module's implementation, so that we can override the bundle plugin
  // handler, and so that we can set the Log entity type's bundle_plugin_type.
  $module = 'farm_entity';
  if ($hook == 'entity_type_build') {
    $implementation = [
      $module => $implementations[$module],
    ];
    unset($implementations[$module]);
    $implementations = array_merge($implementation, $implementations);
  }
}