ImageStyle::fileUriTarget

protected ImageStyle::fileUriTarget($uri)

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()

File

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

Class

ImageStyle
Defines an image style configuration entity.

Namespace

Drupal\image\Entity

Code

protected function fileUriTarget($uri) {
  return file_uri_target($uri);
}
doc_Drupal
2016-10-29 09:19:30
Comments
Leave a Comment

Please login to continue.