kisphp/symfony-widgets

Kisphp Symfony Widgets Bundle

2.8.1 2017-09-17 16:31 UTC

README

Add widgets functionality in layout

Installation

composer require kisphp/symfony-widgets

Add to AppKernel.php file

<?php

use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Config\Loader\LoaderInterface;

class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            ...
            new WidgetsBundle\WidgetsBundle(),
        );

        ...

        return $bundles;
    }

    ...
}

Add configuration data app/config/config.yml

widgets:
    boxFormsNamespaces:
        - AcmeBundle/Form/BoxForms

Register Twig extension in Bundle's services.yml

services:
    twig.widgets_extensions:
        class: WidgetsBundle\Twig\WidgetsExtensions
        public: true
        arguments: ["@widgets_service"]
        tags:
            - { name: twig.extension }