Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ImageStyle.php

function ImageStyle::getPathToken

Overrides ImageStyleInterface::getPathToken

1 call to ImageStyle::getPathToken()
ImageStyle::buildUrl in core/modules/image/src/Entity/ImageStyle.php
Returns the URL of this image derivative for an original image path or URI.

File

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

Class

ImageStyle
Defines an image style configuration entity.

Namespace

Drupal\image\Entity

Code

public function getPathToken($uri) {
    // Return the first 8 characters.
    return substr(Crypt::hmacBase64($this->id() . ':' . $this->addExtension($uri), $this->getPrivateKey() . $this->getHashSalt()), 0, 8);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal