ImageStyle::getReplacementID

public 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.x, will be removed before Drupal 9.0.x. Use \Drupal\image\ImageStyleStorageInterface::getReplacementId() instead.

See also

\Drupal\image\ImageStyleStorageInterface::getReplacementId()

File

core/modules/image/src/Entity/ImageStyle.php, line 380

Class

ImageStyle
Defines an image style configuration entity.

Namespace

Drupal\image\Entity

Code

public function getReplacementID() {
  /** @var \Drupal\image\ImageStyleStorageInterface $storage */
  $storage = $this->entityTypeManager()->getStorage($this->getEntityTypeId());
  return $storage->getReplacementId($this->id());
}
doc_Drupal
2016-10-29 09:19:32
Comments
Leave a Comment

Please login to continue.