function ImageStyle::getReplacementID
Returns the replacement ID for the image style.
Return value
string|null The replacement image style ID, or NULL if no replacement exists.
Deprecated
in drupal:11.3.0 and is removed from drupal:12.0.0. There is no replacement.
See also
https://www.drupal.org/node/3520914
\Drupal\image\ImageStyleStorageInterface::getReplacementId
File
-
core/
modules/ image/ src/ Entity/ ImageStyle.php, line 447
Class
- ImageStyle
- Defines an image style configuration entity.
Namespace
Drupal\image\EntityCode
public function getReplacementID() {
@trigger_error("\\Drupal\\image\\Entity\\ImageStyle::getReplacementID() is deprecated in drupal:11.3.0 and is removed from drupal:12.0.0. There is no replacement. See https://www.drupal.org/node/3520914", E_USER_DEPRECATED);
/** @var \Drupal\image\ImageStyleStorageInterface $storage */
$storage = $this->entityTypeManager()
->getStorage($this->getEntityTypeId());
return $storage->getReplacementId($this->id());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.