public function ConfigBit::configSave in Varbase: The Ultimate Drupal CMS Starter Kit (Bootstrap Ready) 9.0.x
Same name and namespace in other branches
- 8.8 src/Config/ConfigBit.php \Drupal\varbase\Config\ConfigBit::configSave()
React to a config object being saved.
Parameters
\Drupal\Core\Config\ConfigCrudEvent $event: The Config crud event.
File
- src/
Config/ ConfigBit.php, line 174
Class
- ConfigBit
- Class ConfigBit.
Namespace
Drupal\varbase\ConfigCode
public function configSave(ConfigCrudEvent $event) {
$saved_config = $event
->getConfig();
$saved_config_name = $saved_config
->getName();
$supportedConfigTypes = $this
->supportedConfigTypes();
// Process config bits for each supported config type.
foreach ($supportedConfigTypes as $supportedConfigType) {
if (preg_match($supportedConfigType['config_name_match'], $saved_config_name)) {
$this
->processConfigBits($supportedConfigType, $saved_config);
}
}
}