‪TYPO3CMS  11.5
TYPO3\CMS\Core\ViewHelpers\NormalizedUrlViewHelper Class Reference
Inheritance diagram for TYPO3\CMS\Core\ViewHelpers\NormalizedUrlViewHelper:

Public Member Functions

 initializeArguments ()
 

Static Public Member Functions

static string renderStatic (array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext)
 

Detailed Description

Normalizes a path that uses EXT: syntax or an absolute URL to an absolute web path

Examples

Url::

<core:normalizedUrl pathOrUrl="https://foo.bar/img.jpg" />

Output::

https://foo.bar/img.jpg

Path::

<core:normalizedUrl pathOrUrl="EXT:core/Resources/Public/Images/typo3_black.svg" />

Output::

/typo3/sysext/core/Resources/Public/Images/typo3_black.svg

Definition at line 49 of file NormalizedUrlViewHelper.php.

Member Function Documentation

◆ initializeArguments()

TYPO3\CMS\Core\ViewHelpers\NormalizedUrlViewHelper::initializeArguments ( )

Initializes the arguments

Definition at line 55 of file NormalizedUrlViewHelper.php.

◆ renderStatic()

static string TYPO3\CMS\Core\ViewHelpers\NormalizedUrlViewHelper::renderStatic ( array  $arguments,
\Closure  $renderChildrenClosure,
RenderingContextInterface  $renderingContext 
)
static

Ouputs what is given as URL or extension relative path as absolute URL

Parameters
array$arguments
\Closure$renderChildrenClosure
RenderingContextInterface$renderingContext
Returns
‪string

Definition at line 68 of file NormalizedUrlViewHelper.php.

References TYPO3\CMS\Core\Utility\PathUtility\getPublicResourceWebPath(), and TYPO3\CMS\Core\Utility\PathUtility\hasProtocolAndScheme().