replaceImageStyle example


  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();
      }
    }
  }

  /** * {@inheritdoc} */
Home | Imprint | This part of the site doesn't use cookies.