PHPackages                             colin/action-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. colin/action-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

colin/action-bundle
===================

Provide configuration based generic actions.

28PHP

Since Feb 22Pushed 11y ago1 watchersCompare

[ Source](https://github.com/maximecolin/ColinActionBundle)[ Packagist](https://packagist.org/packages/colin/action-bundle)[ RSS](/packages/colin-action-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

ColinActionBundle
=================

[](#colinactionbundle)

This bundle provides configuration based engine to declare generic actions with routes. The bundle come with 5 generic CRUD actions (Create, Read, Update, Delete, List) which can be configured for all your entity.

You can also add your own generic actions or extends existant ones.

Configuration
-------------

[](#configuration)

```
colin_action:
    configurations:
        list:   Colin\Bundle\ActionBundle\Configuration\ListActionConfiguration
        create: Colin\Bundle\ActionBundle\Configuration\CreateActionConfiguration
        update: Colin\Bundle\ActionBundle\Configuration\UpdateActionConfiguration
        delete: Colin\Bundle\ActionBundle\Configuration\DeleteActionConfiguration
        read:   Colin\Bundle\ActionBundle\Configuration\ReadActionConfiguration
    actions:
        admin:
            dummy:
                create:
                    type: create
                    configs:
                        #path:         /dummy/create
                        entity_class: Acme\DemoBundle\Entity\Dummy
                        form_type:    Acme\DemoBundle\Form\Type\DummyType
                        template:     AcmeDemoBundle:Dummy:create.html.twig
                        host:         photo.%domain%
                update:
                    type: update
                    configs:
                        #path: ~
                        entity_class: Acme\DemoBundle\Entity\Dummy
                        form_type:    Acme\DemoBundle\Form\Type\DummyType
                        template:     AcmeDemoBundle:Dummy:create.html.twig
                        host:         photo.%domain%
                read:
                    type: read
                    configs:
                        #path: ~
                        entity_class: Acme\DemoBundle\Entity\Dummy
                        template:     AcmeDemoBundle:Dummy:read.html.twig
                        host:         photo.%domain%
                list:
                    type: list
                    configs:
                        #path: ~
                        entity_class: Acme\DemoBundle\Entity\Dummy
                        template:     AcmeDemoBundle:Dummy:list.html.twig
                        host:         photo.%domain%

```

This config will generate 5 actions and routes to administrate the Dummy entity.

Create your own generic action
------------------------------

[](#create-your-own-generic-action)

### Create your action as service

[](#create-your-action-as-service)

```
