function ImageStyle::postSave
Overrides EntityBase::postSave
File
- 
              core/modules/ image/ src/ Entity/ ImageStyle.php, line 107 
Class
- ImageStyle
- Defines an image style configuration entity.
Namespace
Drupal\image\EntityCode
public function postSave(EntityStorageInterface $storage, $update = TRUE) {
  parent::postSave($storage, $update);
  if ($update) {
    if (!empty($this->original) && $this->id() !== $this->original
      ->id()) {
      // The old image style name needs flushing after a rename.
      $this->original
        ->flush();
      // Update field settings if necessary.
      if (!$this->isSyncing()) {
        static::replaceImageStyle($this);
      }
    }
    else {
      // Flush image style when updating without changing the name.
      $this->flush();
    }
  }
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
