public function ImageStyle::getReplacementID in Drupal 8
Same name and namespace in other branches
- 9 core/modules/image/src/Entity/ImageStyle.php \Drupal\image\Entity\ImageStyle::getReplacementID()
Returns the replacement ID.
Return value
string|null The replacement image style ID or NULL if no replacement has been selected.
Overrides ImageStyleInterface::getReplacementID
Deprecated
in drupal:8.0.0 and is removed from drupal:9.0.0. Use \Drupal\image\ImageStyleStorageInterface::getReplacementId() instead.
See also
\Drupal\image\ImageStyleStorageInterface::getReplacementId()
File
- core/
modules/ image/ src/ Entity/ ImageStyle.php, line 422
Class
- ImageStyle
- Defines an image style configuration entity.
Namespace
Drupal\image\EntityCode
public function getReplacementID() {
/** @var \Drupal\image\ImageStyleStorageInterface $storage */
$storage = $this
->entityTypeManager()
->getStorage($this
->getEntityTypeId());
return $storage
->getReplacementId($this
->id());
}