Filter Action

Opens an additional view that contains all available filters of a table.

Type filter
Options
Class Enhavo\Bundle\AppBundle\Action\Type\FilterActionType
Parent Enhavo\Bundle\AppBundle\Action\AbstractActionType

Basic Usage

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 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: property

Options

label

type: string default: label.filter

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

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

icon

type: string default: filter_list

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

actions:
    myAction:
        icon: myIcon
        # ... 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

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