3 namespace Drupal\image;
5 use Drupal\Core\Config\Entity\ConfigEntityStorage;
8 * Storage controller class for "image style" configuration entities.
10 class ImageStyleStorage extends ConfigEntityStorage implements ImageStyleStorageInterface {
13 * Image style replacement memory storage.
15 * This value is not stored in the backend. It's used during the deletion of
16 * an image style to save the replacement image style in the same request. The
17 * value is used later, when resolving dependencies.
21 * @see \Drupal\image\Form\ImageStyleDeleteForm::submitForm()
23 protected $replacement = [];
28 public function setReplacementId($name, $replacement) {
29 $this->replacement[$name] = $replacement;
35 public function getReplacementId($name) {
36 return isset($this->replacement[$name]) ? $this->replacement[$name] : NULL;
42 public function clearReplacementId($name) {
43 unset($this->replacement[$name]);