Provides an easy way to create a RESTful CRUD for your entities.

Installs: 40

Dependents: 0

Stars: 1

Watchers: 1

Open Issues: 1

Language: PHP

v0.1.0 2013-12-11 15:34 UTC


NOTE: This bundle is under heavy development, use at your own risk

Provides an easy way to create a RESTful CRUD for your entities.

Full Default Configuration

    default_controller_class:  Zenstruck\ResourceBundle\Controller\ResourceController
    controller_utils_class:  Zenstruck\ResourceBundle\Controller\ControllerUtil

        # Prototype

            # The entity (in the short notation) to create a resource controller for.
            entity:               ~ # Required, Example: AppBundle:Product

            # The optional FQN of the resource controller. The above "default_controller_class" option will be used if left blank.
            controller_class:     ~

            # The service id for the generated controller. By default it is: "<bundle_prefix>.controller.<resource_name>".
            controller_id:        ~

            # The optional FQN of the form. It defaults to the Symfony2 standard for the resource.
            form_class:           ~

            # The default route to use after create/edit/delete actions.  Defaults to the "list" action if enabled or "homepage" if not.
            default_route:        ~

            # none: disables permission checking, simple: checks for ROLE_<NAME>_ADMIN on new/edit/delete actions, full: checks for ROLE_<NAME>_<ACTION> on new/edit/delete actions.
            permissions:          none

                enabled:              false

                # An array of disabled actions. Allowed values: list, show, new, post, edit, put, delete.
                disabled_actions:     [] # Example: [show, list]
                prefix:               /
                default_format:       html
                formats:              html # Example: html|json

                # Additional routes for this resource.

                    # Examples:
                        pattern:             /promote
                        methods:             POST
                        pattern:             /{id}/photos

                    # Prototype
                        pattern:              ~ # Required
                        methods:              GET
                        formats:              html
                        default_format:       html

            # The grid option is available when ZenstruckDataGridBundle is installed.
                enabled:              false

                # The service id for the generated grid. By default it is: "<bundle_prefix>.grid.<grid_name>".
                service_id:           ~

                # Customize the grid executor (must implement ExecutorInterface)
                executor_service:     ~

                # Whether or not to use a paginated grid.
                paginated:            true

                    # Prototype
                        label:                ~

                        # Set false to hide on display (can still be filtered/sorted)
                        visible:              true
                        filterable:           false
                        filter_value:         ~
                        sortable:             false
                        sort_direction:       ASC
                        format:               ~
                        align:                ~
                        default:              ~