From 72139c7b6730bcca28b5a325ae0d25b84c1b0ced Mon Sep 17 00:00:00 2001 From: paul121 Date: Thu, 17 Dec 2020 15:20:11 -0800 Subject: [PATCH] Set the views_data handler to use contrib EntityViewsData for all entities with bundle plugins. --- modules/core/entity/farm_entity.module | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/core/entity/farm_entity.module b/modules/core/entity/farm_entity.module index 3c5b2239..d700a149 100644 --- a/modules/core/entity/farm_entity.module +++ b/modules/core/entity/farm_entity.module @@ -6,6 +6,7 @@ */ use Drupal\Core\Entity\EntityTypeInterface; +use Drupal\entity\EntityViewsData; use Drupal\farm_entity\BundlePlugin\FarmEntityBundlePluginHandler; /** @@ -35,6 +36,7 @@ function farm_entity_entity_type_build(array &$entity_types) { if (!empty($entity_types[$entity_type])) { $entity_types[$entity_type]->set('bundle_plugin_type', $entity_type . '_type'); $entity_types[$entity_type]->setHandlerClass('bundle_plugin', FarmEntityBundlePluginHandler::class); + $entity_types[$entity_type]->setHandlerClass('views_data', EntityViewsData::class); } } }