Skip to content

stephylee/SladUsefulBundle

 
 

Repository files navigation

SladUsefulBundle - make typical things easier

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>

About

Symfony 2 bundle with some useful things - custom form types, dql functions, twig extensions, etc...

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 81.6%
  • CSS 9.0%
  • PHP 7.8%
  • HTML 1.6%