2017 © Pedro Peláez
 

symfony-bundle symgrid

Symgrid is a Symfony data grid bundle.

image

arne-groskurth/symgrid

Symgrid is a Symfony data grid bundle.

  • Thursday, July 28, 2016
  • by arnegroskurth
  • Repository
  • 1 Watchers
  • 0 Stars
  • 15 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 9 Versions
  • 0 % Grown

The README.md

Symgrid

Symgrid is a Symfony data grid bundle., (*1)

screenshot, (*2)

Features

  • Supports Doctrine Entities (Entity), QueryBuilder (QueryBuilder) and Array (Array) data sources
  • Built in column types: Alias, Bool, Currency, Date, DateTime, Numeric and String
  • Custom column types definable via Callbacks
  • Multiple values collapsible to single column (e.g. comma-separated)
  • Automatic column type detection
  • Exportable to CSV, HTML, Excel and PDF
  • Mass actions
  • Row actions
  • Generic filters on built in column types
  • Column aggregations respecting filters
  • Automatic Ajax refresh on filter(s) change
  • Row ordering
  • Pagination
  • JavaScript API for registration of event listeners
  • Translation for all labels, column, mass- and row-action titles

Installation

Step 1: Download Symgrid using Composer

Symgrid is available on Packagist and can therefore be installed via Composer:, (*3)

$ composer require arne-groskurth/symgrid

Step 2: Enable the bundle

The SymgridBundle along with the FontAwesomeBundle needs to be registered on the kernel:, (*4)

// app/AppKernel.php

public function registerBundles() {

    $bundles = array(
        // ...
        new ArneGroskurth\Symgrid\ArneGroskurthSymgridBundle(),
        new Bmatzner\FontAwesomeBundle\BmatznerFontAwesomeBundle()
    );
}

Step 3: Install assets

$ php app/console assets:install --symlink

Two stylesheets are available afterwards: - layout.css: Functional stylings taking care e.g. of the visibility of the loading indicator - style.css: Bundled grid style as seen on the screenshot above, (*5)

It is recommended to include both styles and modify them in the applications stylings:, (*6)

<link rel="stylesheet" href="{{ asset('bundles/arnegroskurthsymgrid/layout.css') }}" />
<link rel="stylesheet" href="{{ asset('bundles/arnegroskurthsymgrid/style.css') }}" />

Done!

Getting started

After the installation Symgrid is available as a service and can be configured e.g. inside a controller., (*7)

Basic entity-based grid configuration in controller:

namespace AppBundle\Controller;

use AppBundle\Entity\User;
use ArneGroskurth\Symgrid\Grid\DataSource\EntityDataSource;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;

class DefaultController extends Controller {

    public function testAction() {

        // Construct grid, set an entity as data source and activate bundled grid style
        $grid = $this->get('arnegroskurth_symgrid.grid')
            ->from(User::class)
            ->useDefaultStyle()
        ;

        // Return grid response or fall back to given template
        return $grid->getResponse('view.html.twig', array(
            'grid' => $grid
        ));
    }
}

Symgrid rendering in Twig template

{{ symgrid(grid) }}

Documentation

See the table of contents., (*8)

License

The MIT License (MIT), (*9)

Copyright (c) 2016 Arne Groskurth, (*10)

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:, (*11)

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

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., (*13)

The Versions

28/07 2016

dev-master

9999999-dev https://github.com/arnegroskurth/Symgrid

Symgrid is a Symfony data grid bundle.

  Sources   Download

MIT

The Requires

 

by Arne Groskurth

symfony grid

28/07 2016

v0.1.7

0.1.7.0 https://github.com/arnegroskurth/Symgrid

Symgrid is a Symfony data grid bundle.

  Sources   Download

MIT

The Requires

 

by Arne Groskurth

symfony grid

23/07 2016

v0.1.6

0.1.6.0 https://github.com/arnegroskurth/Symgrid

Symgrid is a Symfony data grid bundle.

  Sources   Download

MIT

The Requires

 

by Arne Groskurth

symfony grid

21/07 2016

v0.1.5

0.1.5.0 https://github.com/arnegroskurth/Symgrid

Symgrid is a Symfony data grid bundle.

  Sources   Download

MIT

The Requires

 

by Arne Groskurth

symfony grid

06/07 2016

v0.1.4

0.1.4.0 https://github.com/arnegroskurth/Symgrid

Symgrid is a Symfony data grid bundle.

  Sources   Download

MIT

The Requires

 

by Arne Groskurth

symfony grid

05/07 2016

v0.1.3

0.1.3.0 https://github.com/arnegroskurth/Symgrid

Symgrid is a Symfony data grid bundle.

  Sources   Download

MIT

The Requires

 

by Arne Groskurth

symfony grid

29/06 2016

v0.1.2

0.1.2.0 https://github.com/arnegroskurth/Symgrid

Symgrid is a Symfony3 data grid bundle.

  Sources   Download

MIT

The Requires

 

by Arne Groskurth

symfony grid

29/06 2016

v0.1.1

0.1.1.0 https://github.com/arnegroskurth/Symgrid

Symgrid is a Symfony3 data grid bundle.

  Sources   Download

MIT

The Requires

 

by Arne Groskurth

symfony grid

28/06 2016

v0.1.0

0.1.0.0 https://github.com/arnegroskurth/Symgrid

Symgrid is a Symfony3 data grid bundle.

  Sources   Download

MIT

The Requires

 

by Arne Groskurth

symfony grid