Overrides \Drupal\Core\Config\Entity\ConfigStorageController::preSave().
Overrides ConfigStorageController::preSave
protected function preSave(EntityInterface $entity) {
parent::preSave($entity);
$entity->name = trim($entity
->label());
// @todo Do not save disabled filters whose properties are identical to
// all default properties.
// Determine whether the format can be cached.
// @todo This is a derived/computed definition, not configuration.
$entity->cache = TRUE;
foreach ($entity
->filters() as $filter) {
if ($filter->status && !$filter->cache) {
$entity->cache = FALSE;
}
}
}