dynamic_entity_reference_test_views.module in Dynamic Entity Reference 8.2
Module file for dynamic_entity_reference_test_views.
File
tests/modules/dynamic_entity_reference_test_views/dynamic_entity_reference_test_views.moduleView source
<?php
/**
* @file
* Module file for dynamic_entity_reference_test_views.
*/
use Drupal\entity_test\EntityTestViewsData;
/**
* Implements hook_entity_type_alter().
*/
function dynamic_entity_reference_test_views_entity_type_alter(array &$entity_types) {
if (\Drupal::state()
->get('dynamic_entity_reference_test_views.entity_test_string_id.view', FALSE)) {
// Integrate with Views.
$entity_types['entity_test_string_id']
->setHandlerClass('views_data', EntityTestViewsData::class);
}
}
Functions
Name | Description |
---|---|
dynamic_entity_reference_test_views_entity_type_alter | Implements hook_entity_type_alter(). |