public ColorConfigCacheInvalidator::onChange(ConfigCrudEvent $event)
Invalidate cache tags when a color theme config object changes.
Parameters
\Drupal\Core\Config\ConfigCrudEvent $event: The Event to process.
File
- core/modules/color/src/EventSubscriber/ColorConfigCacheInvalidator.php, line 38
Class
- ColorConfigCacheInvalidator
- A subscriber invalidating cache tags when color config objects are saved.
Namespace
Drupal\color\EventSubscriber
Code
public function onChange(ConfigCrudEvent $event) { // Changing a theme's color settings causes the theme's asset library // containing the color CSS file to be altered to use a different file. if (strpos($event->getConfig()->getName(), 'color.theme.') === 0) { $this->cacheTagsInvalidator->invalidateTags(['library_info']); } }
Please login to continue.