Action reference
Inherit Options
label
type: string
Overwrite the default label. It will be translated over the translation service automatically (See translationDomain)
actions:
myAction:
label: myLabel
# ... further optiontranslation_domain
type: string
Overwrites the default translationDomain. The selected bundle implements a translation service for automatic translation all translatable designations, e.g. the label
actions:
myAction:
translation_domain: myTranslationDomain
# ... further optionconfirm
type: boolean
If value is true, the action must be confirmed again by the user.
actions:
myAction:
confirm: true|false
# ... further optionconfirm_changes
type: boolean
If this value is true, the form registers changes made and the user must confirm that he wants to continue despite the changes made
actions:
myAction:
confirm_changes: true|false
# ... further optionconfirm_label_cancel
type: string
Overwrites the default cancel-button lettering in the confirm modal window. It will be translated over the translation service automatically (See translationDomain)
actions:
myAction:
confirm_label_cancel: myMessage
# ... further optionconfirm_label_ok
type: string
Overwrites the default confirm-button lettering in the confirm modal window. It will be translated over the translation service automatically (See translationDomain)
actions:
myAction:
confirm_label_ok: myMessage
# ... further optionconfirm_message
type: string
Overwrites the default message in the confirm modal window. It will be translated over the translation service automatically (See translationDomain)
actions:
myAction:
confirm_message: myMessage
# ... further optionhidden
type: boolean
If value set true, the action is hidden
actions:
myAction:
hidden: true|false
# ... further optionicon
type: string
Overwrite the default icon. The Icon is part of the clickable button.
actions:
myAction:
icon: myIcon
# ... further optionpermission
type: string
Defines the minimum access rights a user needs to use this action.
actions:
myAction:
permission: myPermission
# ... further optionsroute
type: string
Defines which route should be used for the overlay.
actions:
myAction:
route: my_routeroute_parameters
type: array
If route is defined, you can overwrite the standard parameters to generate your own url.
actions:
myAction:
route_parameters:
id: $idview_key
type: string
Set the enhavo view key of the new target window
actions:
myAction:
view_key: 'edit-view'
# ... further optionClose
The close action closes the current window and can ask the user to save previously made changes.
| Type | close |
| Class | Enhavo\Bundle\AppBundle\Action\Type\CloseActionType |
| Parent | Enhavo\Bundle\AppBundle\ActionAbstractActionType |
| Inherit Options | iconlabel, translation_domain, hidden, permission |
Comment
This action redirects the user to the comments that have been posted on an article, blog entry or similar. The class for which this action should be used must implement the CommentSubjectInterface like for example the entity Enhavo\Bundle\ArticleBundle\Entity\Article
| Type | comment |
| Class | Enhavo\Bundle\CommentBundle\Action\CommentsActionType |
| Parent | Enhavo\Bundle\AppBundle\ActionAbstractActionType |
| Inherit Options | label, route, translation_domain, icon, permission, hidden |
Create
The CreateAction represents a create button for a specific route.
| Type | create |
| Class | Enhavo\Bundle\AppBundle\Action\Type\CreateActionType |
| Parent | Enhavo\Bundle\AppBundle\Action\Type\OpenActionType |
| Options | route* |
| Inherit Options | route_parameters, label, translation_domain, hidden, permission, view_key |
route
type: string
Define which route should be used for the create overlay.
actions:
create:
type: create
route: my_create_routeDelete
Deletes the current resource and closes the window.
| Type | delete |
| Class | Enhavo\Bundle\AppBundle\Action\Type\DeleteActionType |
| Options | route* |
| Inherit Options | route_parameters, label, translation_domain, hidden, permission, view_key, confirm, confirm_message, confirm_label_ok, confirm_label_cancel |
route
type: string
Define which route should be used to delete the selected resource.
actions:
delete:
type: delete
route: my_delete_routeDownload
Downloads the current resource. The Resource has to implement the Enhavo\\Bundle\\MediaBundle\\Model\\FileInterface{.interpreted-text role="class"}
| Type | download |
| Class | Enhavo\Bundle\AppBundle\Action\Type\DownloadActionType |
| Options | route* |
| Inherit Options | route_parameters, label, translation_domain, hidden, permission, view_key, confirm, confirm_message, confirm_label_ok, confirm_label_cancel |
route
type: string
Defines which route should be used to download the selected resource.
actions:
download:
type: download
route: my_download_routeajax
type: boolean
If the value is true, the download request call is executed via "Ajax"-Call in the background.
actions:
download:
type: download
route: my_download_route
ajax: trueDuplicate
Duplicates the current resource and creates a new instance with the same values.
| Type | download |
| Class | Enhavo\Bundle\AppBundle\Action\Type\DuplicateActionType |
| Options | route* |
| Inherit Options | route_parameters, label, translation_domain, hidden, permission, view_key, confirm, confirm_message, confirm_label_ok, confirm_label_cancel |
route
type: string
Define which route should be used to duplicate the selected resource.
actions:
duplicate:
type: duplicate
route: my_duplicate_routeEvent
Executes all handlers and behaviors of the specified jQuery event.
| Type | event |
| Class | Enhavo\Bundle\AppBundle\Action\Type\EventActionType |
| Options | route*, label*, icon* |
| Inherit Options | route_parameters, translation_domain, hidden, permission, view_key, confirm, confirm_message, confirm_label_ok, confirm_label_cancel |
event
type: string
The jQuery event that is manually triggered when the action is clicked.
actions:
event:
type: event
event: myEventThe event-string "myEvent" represents the jQuery event which has to be present in your project like this general example:
$(document).on("myEvent", function() {
doSomething();
});Filter
Opens an additional view that contains all available filters of a table.
| Type | event |
| Class | Enhavo\Bundle\AppBundle\Action\Type\EventActionType |
| Inherit Options | label, icon, translation_domain, hidden, permission, view_key |
Filters must be added under my_entity_table. By default, this action is only available for the index window which is represented by the my_entity_index route. How to create or add custom filters is described here <add_custom_filter> in more detail.
app_entity_index:
options:
expose: true
path: /app/entity/index
methods: [GET]
defaults:
_controller: app.controller.entity:indexAction
_sylius:
viewer:
actions:
filter:
type: filter
app_entity_table:
options:
expose: true
path: /app/entity/table
methods: [GET,POST]
defaults:
_controller: app.controller.entity:tableAction
_sylius:
filters:
my_filter:
type: property_type
property: propertyModal
| Type | modal |
| Class | Enhavo\Bundle\AppBundle\Action\Type\ModalActionType |
| Options | modal |
| Inherit Options | label, icon, translation_domain, hidden, permission |
modal
type: string
actions:
modal:
type: modal
modal: myModalOpen
Opens the specified route in a separate tab in your browser. Can be used, for example, to view self-created newsletters, products, etc.
| Type | open |
| Class | Enhavo\Bundle\AppBundle\Action\Type\OpenActionType |
| Options | route*target |
| Inherit Options | route_parameters, label, translation_domain, hidden, permission, view_key, confirm, confirm_message, confirm_label_ok, confirm_label_cancel |
route
type: string
Defines which route should be used to open the current resource
actions:
open:
type: open
route: my_open_routetarget
type: string
The target attribute specifies the target window base of a reference. If you use _view, the target window will be a new enhavo view.
actions:
open:
target: _targetOptionOutput Stream
This action is a specified version of the modal-action <modal_action>. The route defines the controller action that generates the output stream of the current resource.
| Type | output_stream |
| Class | Enhavo\Bundle\AppBundle\Action\Type\OutputStreamActionType |
| Options | route* |
| Inherit Options | route_parameters, label, translation_domain, hidden, permission, view_key |
route
type: string
The route defines the action that generates the output stream of the current resource.
actions:
output_stream:
type: output_stream
route: my_output_stream_routePreview
Opens the integrated preview window with three different display modes for desktop, mobile and tablet.
| Type | preview |
| Class | Enhavo\Bundle\AppBundle\Action\Type\PreviewActionType |
| Options | route* |
| Inherit Options | route_parameters, label, translation_domain, hidden, permission, view_key |
route
Defines which preview route should be used to open the preview view.
actions:
preview:
type: preview
route: my_preview_routeSave
Submits the current form and updates the current resource form view.
| Type | save |
| Class | Enhavo\Bundle\AppBundle\Action\Type\SaveActionType |
| Options | route* |
| Inherit Options | route_parameters, label, translation_domain, hidden, permission, view_key |
route
type: string
Define the save route where to send the current form. If you leave that parameter, the form will send to the default action of the form. If the passed resource has already an id, that id will also passed as parameter to the generate url.
actions:
save:
type: save
route: my_save_routeNewsletter Send
Creates a receiver with a link to the currently selected newsletter for each member, all groups added to the newsletter. After that, the newsletter was prepared, but has not yet been sent out. The enhavo:newsletter:send command will send all newsletters that have not been sent up to that point to their respective receiver. To make sure that this happens regularly (e.g. at the same time every day) it is recommended to set up a cronjob for this command in your production environment.
| Type | newsletter_send |
| Class | Enhavo\Bundle\NewsletterBundle\Action\SendActionType |
| Options | |
| Inherit Options | label, translation_domain, hidden, permission |
Newsletter Send Test
Sends the selected newsletter to any e-mail address for testing. The address can be changed each time. In contrast to the normal newsletter_send_action, the newsletter is sent immediately.
| Type | newsletter_send |
| Class | Enhavo\Bundle\NewsletterBundle\Action\SendTestActionType |
| Options | modal, |
| Inherit Options | label, translation_domain, hidden, permission |
modal
type: string
[
'component' => 'ajax-form-modal',
'route' => 'enhavo_newsletter_newsletter_test_form',
'actionRoute' => 'enhavo_newsletter_newsletter_test'
]In this modal the e-mail address is entered and the routes for the form and the controller are defined.
actions:
modal:
type: modal
modal:
component: my_modal_component
route: my_modal_form_route
actionRoute: my_modal_action_routeUpdate
Opens a window in which the selected resource can be edited. Can be used in a table column if the default opening route is used for something else.
| Type | update |
| Class | Enhavo\Bundle\AppBundle\Action\Type\UpdateActionType |
| Options | route* |
| Inherit Options | route_parameters, label, translation_domain, hidden, permission, view_key |
route
type: string
Defines which update route should be used to edit the selected resource.
actions:
update:
type: update
route: my_ressource_update_route