Duplicate Action

Duplicates the current resource and creates a new instance with the same values.

Type delete
Require
Options
Class Enhavo\Bundle\AppBundle\Action\Type\DuplicateActionType
Parent Enhavo\Bundle\AppBundle\Action\AbstractUrlActionType

Require

route

type: string default: null

Define which route should be used to duplicate the selected resource.

actions:
    duplicate:
        type: duplicate
        route: my_duplicate_route

Options

label

type: string default: label.duplicate

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

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

translation_domain

type: string default: EnhavoAppBundle

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 option

icon

type: string default: content_copy

Overwrite the default icon. The Icon is part of the clickable button.

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

permission

type: string default: null

Defines the minimum access rights a user needs to use this action.

actions:
    myAction:
        permission: myPermission
        # ... further options

hidden

type: boolean default: false

If value set true, the action is hidden

actions:
    myAction:
        hidden: true|false
        # ... further option

route_parameters

type: array default: []

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

actions:
    myAction:
        route_parameters:
            id: $id

confirm

type: boolean default: true

If value is true, the action must be confirmed again by the user.

actions:
    myAction:
        confirm: true|false
        # ... further option

confirm_message

type: string default: message.duplicate.confirm

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 option

confirm_label_ok

type: string default: label.ok

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 option

confirm_label_cancel

type: string default: label.cancel

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 option