You are here

protected function ImageStyle::fileUriTarget in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/image/src/Entity/ImageStyle.php \Drupal\image\Entity\ImageStyle::fileUriTarget()

Provides a wrapper for file_uri_target() to allow unit testing.

Returns the part of a URI after the schema.

@todo: Convert file_uri_target() into a proper injectable service.

Parameters

string $uri: A stream, referenced as "scheme://target" or "data:target".

Return value

string|bool A string containing the target (path), or FALSE if none. For example, the URI "public://sample/test.txt" would return "sample/test.txt".

See also

file_uri_scheme()

1 call to ImageStyle::fileUriTarget()
ImageStyle::buildUri in core/modules/image/src/Entity/ImageStyle.php
Returns the URI of this image when using this style.

File

core/modules/image/src/Entity/ImageStyle.php, line 493
Contains \Drupal\image\Entity\ImageStyle.

Class

ImageStyle
Defines an image style configuration entity.

Namespace

Drupal\image\Entity

Code

protected function fileUriTarget($uri) {
  return file_uri_target($uri);
}