Acts on an entity before the presave hook is invoked.
Used before the entity is saved and before invoking the presave hook.
Overrides ConfigStorageController::preSave
protected function preSave(EntityInterface $entity) {
parent::preSave($entity);
$plugin = $entity
->getPlugin();
// If this plugin has any configuration, ensure that it is set.
if ($plugin instanceof ConfigurableActionInterface) {
$entity
->set('configuration', $plugin
->getConfiguration());
}
}