DeploymentViewsData.php in Build Hooks 8.2
File
src/DeploymentViewsData.php
View source
<?php
namespace Drupal\build_hooks;
use Drupal\Core\Entity\Sql\TableMappingInterface;
use Drupal\Core\Field\FieldDefinitionInterface;
use Drupal\views\EntityViewsData;
class DeploymentViewsData extends EntityViewsData {
protected function mapFieldDefinition($table, $field_name, FieldDefinitionInterface $field_definition, TableMappingInterface $table_mapping, &$table_data) {
if ($field_name === 'contents' && !$this->moduleHandler
->moduleExists('dynamic_entity_reference')) {
return;
}
parent::mapFieldDefinition($table, $field_name, $field_definition, $table_mapping, $table_data);
}
}