class EntityTypeAlter in EntityFieldQuery Views Backend 8
Hierarchy
- class \Drupal\efq_views\Hooks\EntityTypeAlter
Expanded class hierarchy of EntityTypeAlter
1 string reference to 'EntityTypeAlter'
1 service uses EntityTypeAlter
File
- src/
Hooks/ EntityTypeAlter.php, line 12 - Contains \Drupal\efq_views\Hooks\EntityTypeAlter.
Namespace
Drupal\efq_views\HooksView source
class EntityTypeAlter {
/**
* Implements hook_entity_type_alter().
*/
public function alter(array &$entity_types) {
/** @var \Drupal\Core\Entity\EntityTypeInterface $entity_type */
// Replace all used views data handlers with a custom one.
// @todo Decide the right strategy here.
foreach ($entity_types as $entity_type) {
if ($entity_type
->hasHandlerClass('views_data')) {
$entity_type
->setHandlerClass('views_data', EqViewsData::class);
}
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
EntityTypeAlter:: |
public | function | Implements hook_entity_type_alter(). |