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

Public Member Functions

 initializeArguments ()
 
 resolveContentArgumentName ()
 

Static Public Member Functions

static 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 50 of file NormalizedUrlViewHelper.php.

Member Function Documentation

◆ initializeArguments()

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

Definition at line 53 of file NormalizedUrlViewHelper.php.

◆ renderStatic()

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

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

Definition at line 61 of file NormalizedUrlViewHelper.php.

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

◆ resolveContentArgumentName()

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

Explicitly set argument name to be used as content.

Definition at line 73 of file NormalizedUrlViewHelper.php.