protected function DeploymentViewsData::mapFieldDefinition in Build Hooks 3.x
Same name and namespace in other branches
- 8.2 src/DeploymentViewsData.php \Drupal\build_hooks\DeploymentViewsData::mapFieldDefinition()
Puts the views data for a single field onto the views data.
Parameters
string $table: The table of the field to handle.
string $field_name: The name of the field to handle.
\Drupal\Core\Field\FieldDefinitionInterface $field_definition: The field definition defined in Entity::baseFieldDefinitions()
\Drupal\Core\Entity\Sql\TableMappingInterface $table_mapping: The table mapping information
array $table_data: A reference to a specific entity table (for example data_table) inside the views data.
Overrides EntityViewsData::mapFieldDefinition
File
- src/
DeploymentViewsData.php, line 17
Class
- DeploymentViewsData
- Defines a views data handler for the deployment entity.
Namespace
Drupal\build_hooksCode
protected function mapFieldDefinition($table, $field_name, FieldDefinitionInterface $field_definition, TableMappingInterface $table_mapping, &$table_data) {
if ($field_name === 'contents' && !$this->moduleHandler
->moduleExists('dynamic_entity_reference')) {
// When the upgrade path is running, the field type does not yet exist.
return;
}
parent::mapFieldDefinition($table, $field_name, $field_definition, $table_mapping, $table_data);
}