skobkin/useful-bundle

Symfony ShtumiUsefulBundle

Installs: 5 375

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 67

Language:JavaScript

Type:symfony-bundle

4.1.0 2018-08-07 10:04 UTC

This package is auto-updated.

Last update: 2024-12-21 01:23:14 UTC


README

ShtumiUsefulBundle 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

Use Composer:

composer require skobkin/useful-bundle

You also should install SonataAdminBundle and all dependencies for it.

Add ShtumiUsefulBundle to your application kernel

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

Import routes

// app/config/routing.yml

shtumi_useful:
    resource: '@ShtumiUsefulBundle/Resources/config/routing.xml'

Update your configuration

Add form theming to twig

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

Update your configuration in accordance with using ShtumiUsefulBundle things

Load jQuery to your views

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