Be.menus.actionMenuItem ViewHelper <f:be.menus.actionMenuItem>
ViewHelper which returns an option tag.
This ViewHelper only works in conjunction with \TYPO3\
.
This ViewHelper is tailored to be used only in extbase context.
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>
Copied!
Select box 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>
Copied!
Localized select box.
Source code
Go to the source code of this ViewHelper: Be\Menus\ActionMenuItemViewHelper.php (GitHub).
Arguments
Allows arbitrary arguments
This ViewHelper allows you to pass arbitrary arguments not defined below directly
to the HTML tag created. This includes custom
data-
arguments.
The following arguments are available for the be.menus.actionMenuItem ViewHelper:
action
-
- Type
- string
- Required
- 1
the action to be associated with this ActionMenuItem
additionalAttributes
-
- Type
- array
Additional tag attributes. They will be added directly to the resulting HTML tag.
arguments
-
- Type
- array
- Default
- array ( )
additional controller arguments to be passed to the action when this ActionMenuItem is selected
aria
-
- Type
- array
Additional aria-* attributes. They will each be added with a "aria-" prefix.
controller
-
- Type
- string
- Required
- 1
controller to be associated with this ActionMenuItem
data
-
- Type
- array
Additional data-* attributes. They will each be added with a "data-" prefix.
label
-
- Type
- string
- Required
- 1
label of the option tag