You are here

function thunder_taxonomy_entity_type_alter in Thunder 8.5

Same name and namespace in other branches
  1. 8.2 modules/thunder_taxonomy/thunder_taxonomy.module \thunder_taxonomy_entity_type_alter()
  2. 8.3 modules/thunder_taxonomy/thunder_taxonomy.module \thunder_taxonomy_entity_type_alter()
  3. 8.4 modules/thunder_taxonomy/thunder_taxonomy.module \thunder_taxonomy_entity_type_alter()
  4. 6.2.x modules/thunder_taxonomy/thunder_taxonomy.module \thunder_taxonomy_entity_type_alter()
  5. 6.0.x modules/thunder_taxonomy/thunder_taxonomy.module \thunder_taxonomy_entity_type_alter()
  6. 6.1.x modules/thunder_taxonomy/thunder_taxonomy.module \thunder_taxonomy_entity_type_alter()

Implements hook_entity_type_alter().

File

modules/thunder_taxonomy/thunder_taxonomy.module, line 13
Module for adding custom Infinity base functions.

Code

function thunder_taxonomy_entity_type_alter(array &$entity_types) {

  /* @var $entity_types \Drupal\Core\Entity\EntityTypeInterface[] */
  if (!empty($entity_types['taxonomy_term'])) {
    $entity_types['taxonomy_term']
      ->setAccessClass('Drupal\\thunder_taxonomy\\ThunderTermAccessControlHandler');
    $entity_types['taxonomy_term']
      ->setFormClass('default', 'Drupal\\thunder_taxonomy\\ThunderTermForm');
  }
}