Coder Social home page Coder Social logo

northerndatagridbundle's Introduction

Datagrid for Symfony inspired by Zfdatagrid and Magento Grid.

This bundle was initiated by Stanislav Turza (Sorien).

Features

  • Supports Entity (ORM), Document (ODM) and Vector (Array) sources
  • Sortable and Filterable with operators (Comparison operators, range, starts/ends with, (not) contains, is (not) defined, regex)
  • Auto-typing columns (Text, Number, Boolean, Array, DateTime, Date, ...)
  • Locale support for DateTime, Date and Number columns (Decimal, Currency, Percent, Duration, Scientific, Spell out)
  • Input, Select, checkbox and radio button filters filled with the data of the grid or an array of values
  • Export (CSV, Excel, PDF, XML, JSON, HTML, ...)
  • Mass actions
  • Row actions
  • Supports mapped fields with Entity source
  • Securing the columns, actions and export with security roles
  • Annotations and PHP configuration
  • External filters box
  • Ajax loading
  • Pagination (You can also use Pagerfanta)
  • Column width and column align
  • Prefix translated titles
  • Grid manager for multi-grid on the same page
  • Groups configuration for ORM and ODM sources
  • Easy templates overriding (twig)
  • Custom columns and filters creation
  • ...

Documentation

See the summary.

Screenshot

Full example with this CSS style file:

test

Simple example with the external filter box in english:

test

Same example in french:

test

Data used in these screenshots (this is a phpMyAdmin screenshot):

test

Simple grid with an ORM source

<?php

namespace MyProject\MyBundle\Controller;

use APY\DataGridBundle\Grid\Source\Entity;

class DefaultController extends Controller
{
	public function myGridAction()
	{
		// Creates a simple grid based on your entity (ORM)
		$source = new Entity('MyProjectMyBundle:MyEntity');

		// Get a Grid instance
		$grid = $this->get('grid');

		// Attach the source to the grid
		$grid->setSource($source);

		// Return the response of the grid to the template
		return $grid->getGridResponse('MyProjectMyBundle::myGrid.html.twig');
	}
}

Simple configuration of the grid in the entity

<?php

namespace MyProject\MyBundle\Entity

use Doctrine\ORM\Mapping as ORM;
use APY\DataGridBundle\Grid\Mapping as Grid;

/**
 * @Grid\Source(columns="id, my_datetime")
 */
class MyEntity
{
	/*
	 * @ORM\Column(type="integer")
	 */
	protected $id;

	/*
	 * @ORM\Column(type="datetime")
	 */
	protected $my_datetime;
}

Display the grid in a twig template

<?php
<!-- MyProject\MyBundle\Resources\views\myGrid.html.twig -->

{{ grid(grid) }}

And clear your cache.

northerndatagridbundle's People

Contributors

sorien avatar cpkdevries avatar doncallisto avatar natewiebe13 avatar sterrien avatar artscorestudio avatar hmert avatar qferr avatar npotier avatar daum avatar plfort avatar delirehberi avatar ip512 avatar michelpa avatar pierredup avatar eugene1g avatar stanislavprokopov avatar b-durand avatar slimus avatar tomcyr avatar lstrojny avatar boekkooi avatar patgrudniewski avatar rgarcia-martin avatar darnel avatar mlledelphine avatar cordoval avatar wattson avatar jan0707 avatar ousamabenyounes avatar

Stargazers

Javier Leal avatar Hans Mackowiak avatar magepsycho avatar  avatar  avatar

Watchers

 avatar James Cloos avatar  avatar  avatar

Forkers

b3-it awm1

northerndatagridbundle's Issues

PHPExcel is deprecated use PHPSpreadsheet instead

same with APYDataGridBundle, this one needs to update to newer PHPSpreadsheet.

i can try to make MR for this from other forks and similar bundles.

but last time working with APYDataGridBundle, i couldn't get the tests working because of mongoDB stuff.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.