ActionMenuViewHelper extends AbstractTagBasedViewHelper
This class is the implementation of a Fluid ViewHelper.
View this class in the TYPO3 ViewHelper reference: <f:be.menus.actionmenu>
ViewHelper which returns a select box, that can be used to switch between multiple actions and controllers and looks similar to TYPO3s funcMenu.
.. note:: This ViewHelper is experimental!
Examples
Simple::
<f:be.menus.actionMenu> <f:be.menus.actionMenuItem label="Overview" controller="Blog" action="index" /> <f:be.menus.actionMenuItem label="Create new Blog" controller="Blog" action="new" /> <f:be.menus.actionMenuItem label="List Posts" controller="Post" action="index" arguments="{blog: blog}" /> </f:be.menus.actionMenu>
Selectbox with the options "Overview", "Create new Blog" and "List Posts".
Localized::
<f:be.menus.actionMenu> <f:be.menus.actionMenuItem label="{f:translate(key:'overview')}" controller="Blog" action="index" /> <f:be.menus.actionMenuItem label="{f:translate(key:'create_blog')}" controller="Blog" action="new" /> </f:be.menus.actionMenu>
Localized selectbox.
Table of Contents
Properties
- $childNodes : array<string|int, mixed>
- An array of \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode
- $tagName : string
Methods
- compile() : mixed
- initializeArguments() : mixed
- Initialize arguments.
- render() : string
- Render FunctionMenu
- loadRequireJsModule() : string
- Renders `<script src="JavaScriptHandler.js">...</script>` for loading corresponding module. Using `JavaScriptRenderer` makes this independent from `PageRenderer` and its current application state.
Properties
$childNodes
An array of \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode
protected
array<string|int, mixed>
$childNodes
= []
$tagName
protected
string
$tagName
= 'select'
Methods
compile()
public
compile(string $argumentsName, string $closureName, string &$initializationPhpCode, ViewHelperNode $node, TemplateCompiler $compiler) : mixed
Parameters
- $argumentsName : string
- $closureName : string
- $initializationPhpCode : string
- $node : ViewHelperNode
- $compiler : TemplateCompiler
initializeArguments()
Initialize arguments.
public
initializeArguments() : mixed
Tags
render()
Render FunctionMenu
public
render() : string
Return values
stringloadRequireJsModule()
Renders `<script src="JavaScriptHandler.js">...</script>` for loading corresponding module. Using `JavaScriptRenderer` makes this independent from `PageRenderer` and its current application state.
protected
loadRequireJsModule(string $name) : string
Parameters
- $name : string