Skip to content
Snippets Groups Projects
Commit 99d08c67 authored by Erik Petra's avatar Erik Petra Committed by Martin Giessing
Browse files

Issue #3413107 by erik_petra: Can't adjust Description field in taxonomy transform

parent 82be3459
No related branches found
No related tags found
1 merge request!4Enable display configuration for transform when it's enabled for view
......@@ -82,3 +82,17 @@ function transform_api_entity_transform_mode_presave(EntityTransformModeInterfac
function transform_api_entity_transform_mode_delete(EntityTransformModeInterface $transform_mode) {
\Drupal::service('router.builder')->setRebuildNeeded();
}
/**
* Implements hook_entity_base_field_info_alter().
*/
function transform_api_entity_base_field_info_alter(&$fields, \Drupal\Core\Entity\EntityTypeInterface $entity_type) {
/** @var \Drupal\Core\Field\BaseFieldDefinition $field */
foreach ($fields as $field) {
// If the field is configurable for view display
// then it should be configurable for a transform mode.
if ($field->isDisplayConfigurable('view')) {
$field->setDisplayConfigurable('transform', TRUE);
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment