Download the PHP package popov/zfc-data-grid-plugin without Composer

On this page you can find all versions of the php package popov/zfc-data-grid-plugin. 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 zfc-data-grid-plugin

ZF2 DataGrid Plugin Module

Welcome to the official ZfcDataGrid documentation. This documentation will help you to quickly understand how to use ZfcDataGrid.

If you are looking for some information that is not listed in the documentation, please open an issue!

ZF DataGrid Plugin Module based on ZfcDatagrid and is a kind of superstructure. Its main goal to reduce using complexity and improve code readability.

This module register new data_grid_plugins global config key and add ColumnFactory.

Working principle is using ZF2 way like which use array configuration for create form elements.

Important! DataGridPluginManager set $shareByDefault = false, this allow avoid redundant classes declaration in configuration.

Usage

Register Plugin. For this move content of in global

In general you create new Grid class which will be response for concrete Grid in your ecosystem.

Columns

Columns Introduction

The column definition is a central part of ZfcDataGrid, they are used to tell the grid what columns to display and how to display them.

Column Types

Select

A minimal column definition looks like this:

GROUP_CONCAT
Doctrine

Sometimes we need use built-in database functions for aggregate result. For this purpose we need give or as argument to column.

Advanced Usage\ Doctrine DOES NOT support expression below and throw Exception [Syntax Error] line 0, col 218: Error: Unexpected 'NULL':

Insteat of example above you can use NULLIF operator (which is supported):

Notice: Some functions like GROUP_CONCAT is represented only in one database so Doctrine don't support it by default so you need include relative package to you project.

ZendTable

Column Data Types

Number

The Number (original: Type\Number) column data types is used to format numbers using the PHP NumberFormatter, and so you can use the NumberFormatter properties in this data type, to do so you create a Number object which can takes the following parameters in order:

You can also do the following for this type:

A usage Example of this column data type is the following:

Column Data Styles

Align

The Align is used to change text direction of rows or columns of the grid, to create the Align do the following:

or

If you set column type as Number the text direction automatically will be changed to right

BackgroundColor

The BackgroundColor is used to change background color of rows or columns of the grid, to create a BackgroundColor do the following:

where the parameters are the color red green blue values.

To see how to apply style on rows or columns see the [Applying Style](#Applying Style) section.

Bold

The Bold style simply make the text bold, you can create a bold style like this:

To see how to apply style on rows or columns see the [Applying Style](#Applying Style) section.

Color

The Color is used to change the color of rows or columns of the grid, to create a Color do the following::

where the parameters are the color red green blue values.

To see how to apply style on rows or columns see the [Applying Style](#Applying Style) section.

Italic

The Italic style simply make the text italic, you can create an Italic style like this:

where the parameters are the color red green blue values.

To see how to apply style on rows or columns see the [Applying Style](#Applying Style) section.

Strikethrough

The Strikethrough style simply make the text strikethrough, you can create a bold style like this:

To see how to apply style on rows or columns see the [Applying Style](#Applying Style) section.

CSSClass

The CSSClass is used to set additional classes attribute of rows or cells of the grid, to create a CSSClass do the following::

Applying Style

You can add multiple conditions for the style using ByValue, and you can set the operator between the multiple conditions to be 'OR' or 'AND' like the following:

Notice. This functionality is not full tested!

Column Data Formatters

Link

The Link formatters displays a column content as an HTML link with value and href is the column content, to use it do the following:

You also can pass Column object as 'placeholder_column'

The link formatter also support multiple placeholders for build url

Inline

Inline Formatter allow to show text in one line. This will be replace all <br>, \n and some other filtration for full compatibility with jqGrid.

ExternalLink

ExternalLink Formatter allow use full URL without inner rawurlencode preparation.

Preference is given to Link Formatter. Use in extreme cases.

DropDown in search panel

Simple

Just put array with options to filter_select_options. Be carefully options are doubled wrapped with array.

Doctrine

filter_select_options config is based on DoctrineModule for Zend\Form (some options need implementation).

DropDown in Edit Record

Doctrine

It's similar to filter_select_options. column_select_options adds dropdown with selected data to Edit Record form.

DatePicker in search panel

At this moment DatePicker require partial settings. You must carefully monitor the date formats.

Notice. Intl use default ISO date format (RFC 822). Detailed format explanation you can find in ZF documentation.

Grid Data Sorting

Default grid data sort can be set with sort_default option. ASC sort order will be applied to column position only if any other user filters did not apply before.

Also several default sort orders can be set, simply apply sort_default to relative columns

Grid Data Filtering

Default grid data sort can be set with filter_default_operation option.

like filter will be applied by default if any other user filters did not apply before.

Notice! There is issue which don't allow apply filter from client side.

Buttons

Buttons Introduction

Custom buttons for ZfcDataGrid.

Column Chooser

Object notation:

Config notation:


All versions of zfc-data-grid-plugin with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5
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 popov/zfc-data-grid-plugin contains the following files

Loading the files please wait ....