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

Public Member Functions

 initializeArguments ()
 

Static Public Member Functions

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

Protected Attributes

bool $escapeOutput = false
 

Detailed Description

Displays icon for a FAL resource (file or folder means a :php:TYPO3\CMS\Core\Resource\ResourceInterface).

Examples

Default::

<core:iconForResource resource="{file.resource}" />

Output::

<span class="t3js-icon icon icon-size-small icon-state-default icon-mimetypes-text-html" data-identifier="mimetypes-text-html">
    <span class="icon-markup">
        <img src="/typo3/sysext/core/Resources/Public/Icons/T3Icons/mimetypes/mimetypes-text-html.svg" width="16" height="16">
    </span>
</span>

Definition at line 46 of file IconForResourceViewHelper.php.

Member Function Documentation

◆ initializeArguments()

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

Definition at line 55 of file IconForResourceViewHelper.php.

◆ renderStatic()

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

Definition at line 64 of file IconForResourceViewHelper.php.

Member Data Documentation

◆ $escapeOutput

bool TYPO3\CMS\Core\ViewHelpers\IconForResourceViewHelper::$escapeOutput = false
protected

ViewHelper returns HTML, thus we need to disable output escaping

Definition at line 53 of file IconForResourceViewHelper.php.