You are here

public function ImageStyleStorage::getReplacementId in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/image/src/ImageStyleStorage.php \Drupal\image\ImageStyleStorage::getReplacementId()
  2. 10 core/modules/image/src/ImageStyleStorage.php \Drupal\image\ImageStyleStorage::getReplacementId()

Retrieves the replacement ID of a deleted image style.

The method is retrieving the value stored by ::setReplacementId().

Parameters

string $name: The ID of the image style to be replaced.

Return value

string|null The ID of the image style used as replacement, if there's any, or NULL.

Overrides ImageStyleStorageInterface::getReplacementId

See also

\Drupal\image\ImageStyleStorageInterface::setReplacementId()

File

core/modules/image/src/ImageStyleStorage.php, line 35

Class

ImageStyleStorage
Storage controller class for "image style" configuration entities.

Namespace

Drupal\image

Code

public function getReplacementId($name) {
  return isset($this->replacement[$name]) ? $this->replacement[$name] : NULL;
}