Package

ViewHelpers

ViewHelper Documentation

flux:field.controllerActions

ControllerActions ViewHelper

Renders a FlexForm select field with options fetched from requested extensionName/pluginName and other settings.

There are three basic ways of adding selection options:

And there are a few ways to limit the options that are displayed:

And there are a couple of ways to define/resolve labels for actions:

Marking actions that have required arguments (which cause errors if rendered on a page that is accessible through a traditional menu) is possible but is deactivated for LLL labels; if you use LLL labels and your action requires an argument, be user friendly and note so in the LLL label or docs as applies.

Lastly, you can set a custom name for the field in which case the value does not trigger the Extbase SwitchableControllerActions feature but instead works as any other Flux FlexForm field would.

To use the field just place it in your Flux form (but in almost all cases leave out the "name" argument which is required on all other field types at the time of writing this). Where the field is placed is not important; the order and the sheet location don't matter.

Arguments

name string

Name of the field

label string

Label for the attribute, can be LLL: value. Optional - if not specified, Flux tries to detect an LLL label named "flux.fluxFormId.fields.foobar" based on field name, in scope of extension rendering the Flux form. If field is in an object, use "flux.fluxFormId.objects.objectname.foobar" where "foobar" is the name of the field.

default string

Default value for this attribute

required boolean

If TRUE, this attribute must be filled when editing the FCE

exclude boolean

If TRUE, this field becomes an "exclude field" (see TYPO3 documentation about this)

transform string

Set this to transform your value to this type - integer, array (for csv values), float, DateTime, Tx_MyExt_Domain_Model_Object or ObjectStorage with type hint. Also supported are FED Resource classes.

enabled boolean

If FALSE, disables the field in the FlexForm

requestUpdate boolean

If TRUE, the form is force-saved and reloaded when field value changes

displayCond string

Optional "Display Condition" (TCA style) for this particular field

inherit boolean

If TRUE, the value for this particular field is inherited - if inheritance is enabled by the ConfigurationProvider

inheritEmpty boolean

If TRUE, allows empty values (specifically excluding the number zero!) to be inherited - if inheritance is enabled by the ConfigurationProvider

clear boolean

If TRUE, a "clear value" checkbox is displayed next to the field which when checked, completely destroys the current field value all the way down to the stored XML value

variables anySimpleType

Freestyle variables which become assigned to the resulting Component - can then be read from that Component outside this Fluid template and in other templates using the Form object from this template

extensionName string

If provided, enables overriding the extension context for this and all child nodes. The extension name is otherwise automatically detected from rendering context.

validate string

FlexForm-type validation configuration for this input

size integer

Size of the selector box

multiple boolean

If TRUE, allows multiple selections

minItems integer

Minimum required number of items to be selected

maxItems integer

Maxium allowed number of items to be selected

itemListStyle string

Overrides the default list style when maxItems > 1

selectedListStyle string

Overrides the default selected list style when maxItems > 1 and renderMode is default

renderMode string

Alternative rendering mode - default is an HTML select field but you can also use fx "checkbox" - see TCA select field "renderMode" attribute

items anySimpleType

Optional, full list of items to display - note: if used, this overrides any automatic option filling!

controllerExtensionName string

Name of the Extbase extension that contains the Controller to parse, ex. MyExtension. In vendor based extensions use dot, ex. Vendor.MyExtension

pluginName string

Name of the Extbase plugin that contains Controller definitions to parse, ex. MyPluginName

controllerName string

Optional extra limiting of actions displayed - if used, field only displays actions for this controller name - ex Article(Controller) or FrontendUser(Controller) - the Controller part is implied

actions anySimpleType

Array of "ControllerName" => "csv,of,actions" which are allowed. If used, does not require the use of an ExtensionName and PluginName (will use the one specified in your current plugin automatically)

excludeActions anySimpleType

Array of "ControllerName" => "csv,of,actions" which must be excluded

prefixOnRequiredArguments string

A short string denoting that the method takes arguments, ex * (which should then be explained in the documentation for your extension about how to setup your plugins

disableLocalLanguageLabels boolean

If TRUE, disables LLL label usage and just uses the class comment or Controller->action syntax

localLanguageFileRelativePath string

Relative (from extension $extensionName) path to locallang file containing the action method labels

subActions anySimpleType

Array of sub actions {ControllerName: {list: 'update,delete'}, OtherController: {new: 'create'}} which are also allowed but not presented as options when the mapped action is selected (in example: if ControllerName->list is selected, ControllerName->update and ControllerName->delete are allowed - but cannot be selected).

separator string

Separator string (glue) for Controller->action values, defaults to "->". Empty values result in default being used.

ViewHelper Resources

Schema Resources