You are here

public static function BlazyUtil::transformRelative in Blazy 8.2

A wrapper for file_url_transform_relative() to pass tests anywhere else.

4 calls to BlazyUtil::transformRelative()
BlazyLightbox::build in src/BlazyLightbox.php
Gets media switch elements: all lightboxes, not content, nor iframe.
BlazyManager::backgroundImage in src/BlazyManager.php
Prepares CSS background image.
BlazyManager::thumbnailAndPlaceholder in src/BlazyManager.php
Build thumbnails, also to provide placeholder for blur effect.
BlazyUtil::imageUrl in src/BlazyUtil.php
Provides image url based on the given settings.

File

src/BlazyUtil.php, line 210

Class

BlazyUtil
Provides Blazy utilities.

Namespace

Drupal\blazy

Code

public static function transformRelative($uri, $style = NULL) {
  $url = $style ? $style
    ->buildUrl($uri) : file_create_url($uri);
  return file_url_transform_relative($url);
}