mirror of
https://github.com/farmOS/farmOS.git
synced 2024-02-23 11:37:38 +01:00
Set the views_data handler to use contrib EntityViewsData for all entities with bundle plugins.
This commit is contained in:
parent
ee6e485525
commit
72139c7b67
|
@ -6,6 +6,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use Drupal\Core\Entity\EntityTypeInterface;
|
use Drupal\Core\Entity\EntityTypeInterface;
|
||||||
|
use Drupal\entity\EntityViewsData;
|
||||||
use Drupal\farm_entity\BundlePlugin\FarmEntityBundlePluginHandler;
|
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])) {
|
if (!empty($entity_types[$entity_type])) {
|
||||||
$entity_types[$entity_type]->set('bundle_plugin_type', $entity_type . '_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('bundle_plugin', FarmEntityBundlePluginHandler::class);
|
||||||
|
$entity_types[$entity_type]->setHandlerClass('views_data', EntityViewsData::class);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue