Preview Action

Send the current state of the form to a preview route that will display the view in a separate overview.

type preview
require
option
class Enhavo\Bundle\AppBundle\Button\Button\PreviewButton

Require

route

type: string

Define the preview route where to send the current form.

buttons:
    preview:
        type: preview
        route: my_preview_route

Option

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