function TaxonomyTermDisplayConfigurableTestHooks::entityBaseFieldInfoAlter
Implements hook_entity_base_field_info_alter().
File
-
core/
modules/ taxonomy/ tests/ modules/ taxonomy_term_display_configurable_test/ src/ Hook/ TaxonomyTermDisplayConfigurableTestHooks.php, line 18
Class
- TaxonomyTermDisplayConfigurableTestHooks
- Hook implementations for taxonomy_term_display_configurable_test.
Namespace
Drupal\taxonomy_term_display_configurable_test\HookCode
public function entityBaseFieldInfoAlter(&$base_field_definitions, EntityTypeInterface $entity_type) {
if ($entity_type->id() === 'taxonomy_term') {
/** @var \Drupal\Core\Field\BaseFieldDefinition[] $base_field_definitions */
$base_field_definitions['name']->setDisplayConfigurable('view', TRUE);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.