function DesignToken::preSave
Same name and namespace in other branches
- main core/lib/Drupal/Core/Theme/Entity/DesignToken.php \Drupal\Core\Theme\Entity\DesignToken::preSave()
Overrides ConfigEntityBase::preSave
File
-
core/
lib/ Drupal/ Core/ Theme/ Entity/ DesignToken.php, line 113
Class
- DesignToken
- Configuration entity.
Namespace
Drupal\Core\Theme\EntityCode
public function preSave(EntityStorageInterface $storage) : void {
parent::preSave($storage);
// Ensure scope does not contain a dot.
foreach ($this->scopes as $scope => $value) {
if (\strpos($scope, '.') !== FALSE) {
$this->scopes[static::getConfigScopeName($scope)] = $value;
unset($this->scopes[$scope]);
}
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.