TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Fluid\ViewHelpers\Be\Buttons\IconViewHelper Class Reference
Inheritance diagram for TYPO3\CMS\Fluid\ViewHelpers\Be\Buttons\IconViewHelper:
TYPO3\CMS\Fluid\ViewHelpers\Be\AbstractBackendViewHelper TYPO3\CMS\Fluid\Core\ViewHelper\Facets\CompilableInterface TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper

Public Member Functions

 render ($uri='', $icon='actions-document-close', $title='', $additionalAttributes=[])
 
- Public Member Functions inherited from TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper
 setArguments (array $arguments)
 
 setRenderingContext (\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext)
 
 injectObjectManager (\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager)
 
 injectReflectionService (\TYPO3\CMS\Extbase\Reflection\ReflectionService $reflectionService)
 
 isEscapingInterceptorEnabled ()
 
 setViewHelperNode (\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode $node)
 
 setRenderChildrenClosure (\Closure $renderChildrenClosure)
 
 initializeArgumentsAndRender ()
 
 initialize ()
 
 renderChildren ()
 
 prepareArguments ()
 
 validateArguments ()
 
 initializeArguments ()
 
 compile ($argumentsVariableName, $renderChildrenClosureVariableName, &$initializationPhpCode, \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode $syntaxTreeNode, \TYPO3\CMS\Fluid\Core\Compiler\TemplateCompiler $templateCompiler)
 
 resetState ()
 
- Public Member Functions inherited from TYPO3\CMS\Fluid\Core\ViewHelper\Facets\CompilableInterface
 compile ($argumentsVariableName, $renderChildrenClosureVariableName, &$initializationPhpCode, \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode $syntaxTreeNode, \TYPO3\CMS\Fluid\Core\Compiler\TemplateCompiler $templateCompiler)
 

Static Public Member Functions

static renderStatic (array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext)
 
- Static Public Member Functions inherited from TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper
static renderStatic (array $arguments, \Closure $renderChildrenClosure, \TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext)
 
- Static Public Member Functions inherited from TYPO3\CMS\Fluid\Core\ViewHelper\Facets\CompilableInterface
static renderStatic (array $arguments, \Closure $renderChildrenClosure, \TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext)
 

Additional Inherited Members

- Protected Member Functions inherited from TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper
 registerArgument ($name, $type, $description, $required=false, $defaultValue=null)
 
 overrideArgument ($name, $type, $description, $required=false, $defaultValue=null)
 
 callRenderMethod ()
 
 getLogger ()
 
 buildRenderChildrenClosure ()
 
 hasArgument ($argumentName)
 
- Protected Attributes inherited from TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper
 $arguments
 
 $templateVariableContainer
 
 $controllerContext
 
 $renderingContext
 
 $renderChildrenClosure = null
 
 $viewHelperVariableContainer
 
 $objectManager
 
 $escapingInterceptorEnabled = true
 

Detailed Description

View helper which returns a button icon

= Examples =

<f:be.buttons.icon uri="{f:uri.action()}" /> <output> An icon button as known from the TYPO3 backend, skinned and linked with the default action of the current controller. Note: By default the "close" icon is used as image </output>

<f:be.buttons.icon uri="{f:uri.action(action:'new')}" icon="actions-document-new" title="Create new Foo" />

<f:be.buttons.icon icon="actions-document-new" title="Create new Foo" /> <output> Here the "actions-document-new" icon is returned, but without link. </output>

Deprecated:
since TYPO3 CMS 7, will be removed in TYPO3 CMS 8, use instead

Definition at line 56 of file IconViewHelper.php.

Member Function Documentation

◆ render()

TYPO3\CMS\Fluid\ViewHelpers\Be\Buttons\IconViewHelper::render (   $uri = '',
  $icon = 'actions-document-close',
  $title = '',
  $additionalAttributes = [] 
)

Renders a linked icon as known from the TYPO3 backend.

If the URI is left empty, the icon is rendered without link.

Parameters
string$uriThe target URI for the link. If you want to execute JavaScript here, prefix the URI with "javascript:". Leave empty to render just an icon.
string$iconIcon to be used.
string$titleTitle attribute of the icon construct
array$additionalAttributesAdditional tag attributes. They will be added directly to the resulting HTML tag.
Returns
string The rendered icon with or without link
Deprecated:
since TYPO3 CMS 7, will be removed in TYPO3 CMS 8, use instead

Definition at line 72 of file IconViewHelper.php.

References TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper\buildRenderChildrenClosure().

◆ renderStatic()

static TYPO3\CMS\Fluid\ViewHelpers\Be\Buttons\IconViewHelper::renderStatic ( array  $arguments,
\Closure  $renderChildrenClosure,
RenderingContextInterface  $renderingContext 
)
static
Parameters
array$arguments
callable$renderChildrenClosure
RenderingContextInterface$renderingContext
Returns
string
Deprecated:
since TYPO3 CMS 7, will be removed in TYPO3 CMS 8, use instead

Definition at line 93 of file IconViewHelper.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\logDeprecatedFunction(), TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance(), and TYPO3\CMS\Core\Imaging\Icon\SIZE_SMALL.