Save Action

Will submit the current form and close the overlay.

type save
option
class Enhavo\Bundle\AppBundle\Button\Button\SaveButton

Option

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.

buttons:
    save:
        type: save
        route: my_save_route

routeParameters

type: array

If route is defined, you can overwrite the standard parameters to generate your own url.

buttons:
    myButton:
        routeParameters:
            id: $id

label

type: string

Overwrite the default label. It will be translated over the translation service automatically (See translationDomain)

actions:
    myAction:
        label: myLabel
        # ... further option

icon

type: string

Overwrite the default icon.

actions:
    myAction:
        icon: myIcon
        # ... further option

translationDomain

type: string

Overwrite the default translationDomain. EnhavoAppBundle is used by default

actions:
    myAction:
        translationDomain: myTranslationDomain
        # ... further option

display

type: boolean

If false the button won’t be rendered. The default value is true

buttons:
    myButton:
        display: false
        # ... further option

role

type: string

Add role check for button. No role will be checked by default.

buttons:
    myButton:
        role: MY_ROLE
        # ... further option