public preprocessSourceUri ( string $src ) : string | ||
$src | string | |
return | string |
public function preprocessSourceUri($src)
{
if (false === empty($GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_vhs.']['settings.']['prependPath'])) {
$src = $GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_vhs.']['settings.']['prependPath'] . $src;
} elseif ('BE' === TYPO3_MODE || false === (bool) $this->arguments['relative']) {
if (GeneralUtility::isValidUrl($src)) {
$src = ltrim($src, '/');
} else {
$src = GeneralUtility::getIndpEnv('TYPO3_SITE_URL') . ltrim($src, '/');
}
}
return $src;
}