ZenstruckControllerUtilBundle

Symfony2 Bundle for zenstruck/controller-util

Build Status Scrutinizer Code Quality Code Coverage SensioLabs Insight StyleCI Latest Stable Version License

This bundle integrates the zenstruck/controller-util library into your Symfony2 project. For usage, see its documentation.

Installation

Require this bundle with composer:

composer require zenstruck/controller-util-bundle

Then enable it in your kernel:

// app/AppKernel.php
public function registerBundles()
{
    $bundles = array(
        //...
        new Zenstruck\ControllerUtilBundle\ZenstruckControllerUtilBundle(),
        //...
    );
}

Full Default Configuration

zenstruck_controller_util:

    # When true, only enabled if JMSSerializerBundle is registered.
    serializer_listener:  true
    forward_listener:     true
    redirect_listener:    true
    templating_view_listener:  true
    no_content_view_listener:
        enabled:              true

        # When true, controllers can return just null, otherwise an empty view is required.
        allow_null:           true
    has_flashes_listener:  true
    param_converter_listener:
        enabled:              true
        session:              true
        flash_bag:            true

        # When true, only enabled if security is enabled.
        security_context:     true

        # When true, only enabled if forms are enabled.
        form_factory:         true
    exception_map:

        # Prototype
        exception_class:      ~

Copyright (c) 2015 Kevin Bond

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.