protected function RotateController::convertUrl in Insert 8.2
Same name and namespace in other branches
- 8 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 105
Class
Namespace
Drupal\insert\ControllerCode
protected function convertUrl($url, $absolute) {
return $absolute || strpos($url, $GLOBALS['base_url']) !== 0 ? $url : base_path() . ltrim(str_replace($GLOBALS['base_url'], '', $url), '/');
}