// that all links to Media entities are re-rendered. Ideally, this would
// not be necessary; invalidating the 'entity_types' cache tag should be
// sufficient. But that cache tag would then need to be on nearly
// everything, resulting in excessive complexity. We prefer pragmatism.
'rendered',
]);
// @todo Remove this when invalidating the 'entity_types' cache tag is
// respected by the entity type plugin manager. See
// https://www.drupal.org/project/drupal/issues/3001284 and
// https://www.drupal.org/project/drupal/issues/3013659.
$this->entityTypeManager->
clearCachedDefinitions();
$this->routeBuilder->
setRebuildNeeded();
} } /**
* {@inheritdoc}
*/
public static function getSubscribedEvents(): array
{ $events[ConfigEvents::SAVE
][] =
['onSave'
];
return $events;
}}