slad/useful-bundle

Symfony ShtumiUsefulBundle

Installs: 26

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 68

Language:JavaScript

Type:symfony-bundle

1.0 2016-07-19 15:58 UTC

This package is not auto-updated.

Last update: 2024-04-23 20:04:04 UTC


README

SladUsefulBundle provides some useful things that needed almost in every project. It's:

Form types:

DQL extra functions:

  • IF

  • IFNULL

  • ROUND

  • DATE_DIFF

You can use Ajax autocomplete form type as a filter type with SonataAdminBundle

Installation

Add the following lines to your composer file and then run composer update:

"slad/useful-bundle": "1.0.x-dev"

You also should install SonataAdminBundle and all dependencies for it.

Add SladUsefulBundle to your application kernel

    // app/AppKernel.php
    public function registerBundles()
    {
        return array(
            // ...
            new Slad\UsefulBundle\ShtumiUsefulBundle(),
            // ...
        );
    }

Import routes

// app/config/routing.yml

slad_useful:
    resource: '@SladUsefulBundle/Resources/config/routing.xml'

Update your configuration

Add form theming to twig

twig:
    ...
    form:
        resources:
            - SladUsefulBundle::fields.html.twig

Update your configuration in accordance with using SladUsefulBundle things

Load jQuery to your views

    <script src="http://code.jquery.com/jquery-1.9.1.min.js" type="text/javascript"></script>