public function onConfigSave(ConfigCrudEvent
$event): void
{ $saved_config =
$event->
getConfig();
if ($saved_config->
getName() === 'system.advisories' &&
$event->
isChanged('interval_hours'
)) { $original_interval =
$saved_config->
getOriginal('interval_hours'
);
if ($original_interval &&
$saved_config->
get('interval_hours'
) <
$original_interval) { // If the new interval is less than the original interval, delete the
// stored results.
$this->securityAdvisoriesFetcher->
deleteStoredResponse();
} } } /**
* {@inheritdoc}
*/
public static function getSubscribedEvents(): array
{ $events[ConfigEvents::SAVE
][] =
['onConfigSave'
];
return $events;
}}