You are here

public function ImageStyleInterface::getPathToken in Drupal 8

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

Generates a token to protect an image style derivative.

This prevents unauthorized generation of an image style derivative, which can be costly both in CPU time and disk space.

Parameters

string $uri: The URI of the original image of this style.

Return value

string An eight-character token which can be used to protect image style derivatives against denial-of-service attacks.

1 method overrides ImageStyleInterface::getPathToken()
ImageStyle::getPathToken in core/modules/image/src/Entity/ImageStyle.php
Generates a token to protect an image style derivative.

File

core/modules/image/src/ImageStyleInterface.php, line 90

Class

ImageStyleInterface
Provides an interface defining an image style entity.

Namespace

Drupal\image

Code

public function getPathToken($uri);