Download the PHP package industi/data-grid-bundle without Composer

On this page you can find all versions of the php package industi/data-grid-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package data-grid-bundle

KitpagesDataGridBundle

Build Status

SensioLabsInsight

This Symfony2 Bundle is a simple datagrid bundle. It aims to be easy to use and extensible.

Warning version 3

Version 3 is for symfony ~3.3 and ~4.0 and PHP 7, and only twig ~1.8

Version 3 is here. You can switch to branch 2.x (or tags 2.x) if you want to stay on legacy version.

There is no BC break in the usage between version 2 and version 3, but the version 3 is not compatible with symfony < 3.3.

Warning version 2

Version 2 is here. You can switch to branch 1.x (or tags 1.x) if you want to stay on legacy version. There are BC Breaks between version 1 and version 2.

Actual state

see VERSIONS.md

Features

System Requirement

Documentation

The documentation is in this README and in Resources/doc

Installation

You need to add the following lines in your deps :

Add KitpagesChainBundle in your composer.json

Now tell composer to download the bundle by running the step:

AppKernel.php

Configuration in config.yml

These values are default values. You can skip the configuration if it is ok for you.

Note you can use the followin configuration in order to user Bootstrap 3 :

Simple Usage example

In the controller

Twig associated

In your twig you just have to put this code to display the grid you configured.

{% embed kitpages_data_grid.grid.default_twig with {'grid': grid} %}
{% endembed %}

More advanced usage

In the controller

same controller than before

Twig associated

If you want to add a column on the right of the table, you can put this code in your twig.

{% embed kitpages_data_grid.grid.default_twig with {'grid': grid} %}

    {% block kit_grid_thead_column %}
        <th>Action</th>
    {% endblock %}

    {% block kit_grid_tbody_column %}
        <td><a href="{{ path ("my_route", {"id": item.id}) }}">Edit</a></td>
    {% endblock %}

{% endembed %}

More advanced usage

In the controller

Twig associated

same Twig than before

Field "as"

For request like

$queryBuilder->select("item, item.id * 3 as foo");

You can display the foo field with

$gridConfig->addField("item.id");
$gridConfig->addField("foo");

Events

You can modify the way this bundle works by listening events and modify some objects injected in the $event.

see the event documentation in Resources/doc/30-Events.md

Tags

Tag system is used to get some fields by tags. When you create a field, you can define some tags associated to this field. After that, in the grid config, you can find the fields that match this tag.

// add tag as the third parameter of the field 
$gridConfig->addField("item.id", [], ['foo', 'bar']);
$gridConfig->addField("foo", [], ['myTag', 'foo']);

// get fieldList matching 'bar' tag. There is only one result.
$fieldList = $gridConfig->getFieldListByTag('bar');
$fieldList[0] // -> this is the first Field (which name is 'item.id')

Custom class for the $grid object

By default, the following line

returns an object of the type Grid

You can use your own subclass of Grid. By default the GridManager creates the instance $grid of Grid but you can create the instance by yourself.

Reference guide

Add a field in the gridConfig

when you add a field, you can set these parameters :

What can you personalize in your twig template

With the embed system of twig 1.8 and more, you can override some parts of the default rendering (see example in the "More advanced usage" paragraph).

You can consult the base twig template here to see what you can personalize. https://github.com/kitpages/KitpagesDataGridBundle/blob/master/Resources/views/Grid/grid.html.twig


All versions of data-grid-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
symfony/framework-bundle Version ~3.3|~4.0
symfony/translation Version ~3.3|~4.0
symfony/templating Version ~3.3|~4.0
doctrine/orm Version ~2.5
doctrine/doctrine-bundle Version ~1.8
twig/twig Version ~1.8
symfony/twig-bundle Version ~3.3|~4.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package industi/data-grid-bundle contains the following files

Loading the files please wait ....