MyGit

APY/APYDataGridBundle

Fork: 343 Star: 493 (更新于 2024-11-14 22:49:16)

license: MIT

Language: PHP .

Symfony Datagrid Bundle

最后发布版本: 5.0.0-beta.2 ( 2023-07-05 21:37:06)

GitHub网址

APYDataGrid Bundle

This Symfony Bundle allows you to create wonderful grid based on data or entities of your projet.

Build Status Coverage Status

Features

This bundle allow you to create listing with many features that you can expect :

  • Various data sources : supports Entity (ORM), Document (ODM) and Vector (Array) sources
  • Data manipulation : Sortable and Filterable with many operators
  • Auto-typing columns (Text, Number, Boolean, Array, DateTime, Date, ...)
  • Locale support for columns and data (DateTime, Date and Number columns)
  • 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)
  • 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
  • and many more

Installation, 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

Example of a 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.

Bundle history

Datagrid for Symfony inspired by Zfdatagrid and Magento Grid.
This bundle was initiated by Stanislav Turza (Sorien).

See CHANGELOG and UPGRADE 2.0

最近版本更新:(数据更新于 2024-10-03 17:51:15)

2023-07-05 21:37:06 5.0.0-beta.2

2021-12-02 19:07:35 3.3.0

2019-02-07 22:47:35 3.2.0

2018-03-31 18:46:32 3.1.2

2018-02-15 15:53:46 3.1.1

2017-12-12 00:40:26 3.1.0

2017-08-24 23:11:28 3.0.2

2017-05-17 20:23:28 3.0.1

2017-03-17 00:38:45 3.0.0

2016-12-19 13:33:22 2.3.0

主题(topics):

datagrid, grid, php, symfony-bundle

APY/APYDataGridBundle同语言 PHP最近更新仓库

2024-11-20 23:58:25 laravel/framework

2024-11-20 18:39:23 danielmiessler/SecLists

2024-11-16 21:54:23 w7corp/easywechat

2024-11-16 04:49:03 coollabsio/coolify

2024-11-13 23:19:14 symfony/symfony

2024-11-13 22:53:21 symfony/var-dumper