TYPO3  7.6
Public Member Functions | Static Public Member Functions | List of all members
IconViewHelper Class Reference
Inheritance diagram for IconViewHelper:
AbstractBackendViewHelper CompilableInterface AbstractViewHelper

Public Member Functions

 render ($uri= '', $icon= 'actions-document-close', $title= '', $additionalAttributes=array())
 
- Public Member Functions inherited from 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 CompilableInterface
static renderStatic (array $arguments,\Closure $renderChildrenClosure,\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext)
 

Additional Inherited Members

- Protected Member Functions inherited from 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 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 fluid/Classes/ViewHelpers/Be/Buttons/IconViewHelper.php.

Member Function Documentation

render (   $uri = '',
  $icon = 'actions-document-close',
  $title = '',
  $additionalAttributes = array() 
)

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 fluid/Classes/ViewHelpers/Be/Buttons/IconViewHelper.php.

References AbstractViewHelper\buildRenderChildrenClosure().

static 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 fluid/Classes/ViewHelpers/Be/Buttons/IconViewHelper.php.

References GeneralUtility\logDeprecatedFunction(), GeneralUtility\makeInstance(), and Icon\SIZE_SMALL.