riverwaysoft/grid-bundle

This package is abandoned and no longer maintained. No replacement package was suggested.

Grid bundle

0.5.3 2018-04-04 13:19 UTC

This package is not auto-updated.

Last update: 2021-08-23 09:29:21 UTC


README

Installation

Step 1: Download the Bundle

Install: composer require --prefer-dist riverwaysoft/grid-bundle

Step 2: Enable the Bundle

Then, enable the bundle by adding it to the list of registered bundles in the app/AppKernel.php file of your project:

<?php
// app/AppKernel.php

// ...
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...

            new Riverway\Grid\RiverwayGridBundle(),
        );

        // ...
    }

    // ...
}

Configuration

There are no configuration yet : )

Usage

Controller:

$query = $this->getDoctrine()->getRepository('AppBundle:Order')->createQueryBuilder('o')->getQuery();

return $this->render('index.html.twig', [
    'query' => $query->getQuery(),
]);

Template:

 {{ riverway_grid_render([
    'id',
    'name',
    {'type.key': {'humanize': true, 'label': 'Type'}}
    ], query) }}