ResourceViewHelper

class \TYPO3\CMS\Fluid\ViewHelpers\Uri\ResourceViewHelper

Extends
AbstractViewHelper
Uses
CompileWithRenderStatic

A ViewHelper for creating URIs to resources.

Examples

Best practice with EXT: syntax

::

Output::

Preferred syntax that works in both extbase and non-extbase context.

Defaults

::

Output::

Works only in extbase context since it uses the extbase request to find current extension, magically adds 'Resources/Public' to path.

With extension name

::

Output::

Magically adds 'Resources/Public' to path.

Table of Contents

Methods

initializeArguments()  : mixed
renderStatic()  : string
Render the URI to the resource. The filename is used from child content.

Methods

initializeArguments()

public initializeArguments() : mixed

renderStatic()

Render the URI to the resource. The filename is used from child content.

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

Parameters

$arguments : array
$renderChildrenClosure : Closure
$renderingContext : RenderingContextInterface

Tags

throws
InvalidFileException
throws
RuntimeException

Return values

string —

The URI to the resource

On this page