You are here

function farm_role_entity_type_alter in farmOS 2.x

Implements hook_entity_type_alter().

File

modules/core/role/farm_role.module, line 13
Hooks implemented by the Farm Role module.

Code

function farm_role_entity_type_alter(array &$entity_types) {

  /** @var \Drupal\Core\Entity\EntityTypeInterface[] $entity_types */

  // Replace the storage handler class for Roles.
  $entity_types['user_role']
    ->setHandlerClass('storage', 'Drupal\\farm_role\\FarmRoleStorage');
}