You are here

protected function RotateController::convertUrl in Insert 8

Same name and namespace in other branches
  1. 8.2 src/Controller/RotateController.php \Drupal\insert\Controller\RotateController::convertUrl()

Parameters

string $url:

bool $absolute:

Return value

string

1 call to RotateController::convertUrl()
RotateController::rotate in src/Controller/RotateController.php
Rotates an image regenerating image derivatives for every image style and saving the corresponding entity with the updated image dimensions.

File

src/Controller/RotateController.php, line 106

Class

RotateController

Namespace

Drupal\insert\Controller

Code

protected function convertUrl($url, $absolute) {
  return $absolute || strpos($url, $GLOBALS['base_url']) !== 0 ? $url : base_path() . ltrim(str_replace($GLOBALS['base_url'], '', $url), '/');
}