Skip to content
Snippets Groups Projects
Commit 4849ace8 authored by Martin Giessing's avatar Martin Giessing
Browse files

Issue #3445730 by erik_petra: After creating a menu, menu transform block does not show up

parent 09fa3579
No related branches found
No related tags found
No related merge requests found
......@@ -97,3 +97,27 @@ function transform_api_entity_base_field_info_alter(&$fields, EntityTypeInterfac
}
}
}
/**
* Implements hook_ENTITY_TYPE_insert().
*/
function transform_api_menu_insert(EntityInterface $entity) {
// Invalidate the transform block cache to update menu-based derivatives.
\Drupal::service('plugin.manager.transform_api.transform_block')->clearCachedDefinitions();
}
/**
* Implements hook_ENTITY_TYPE_update().
*/
function transform_api_menu_update(EntityInterface $entity) {
// Invalidate the transform block cache to update menu-based derivatives.
\Drupal::service('plugin.manager.transform_api.transform_block')->clearCachedDefinitions();
}
/**
* Implements hook_ENTITY_TYPE_delete().
*/
function transform_api_menu_delete(EntityInterface $entity) {
// Invalidate the transform block cache to update menu-based derivatives.
\Drupal::service('plugin.manager.transform_api.transform_block')->clearCachedDefinitions();
}
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