Download the PHP package pawellen/listing without Composer

On this page you can find all versions of the php package pawellen/listing. 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 listing

listing

Builder style data table backend plugin for datatables.net js plugin

Version 2 with Symfony 4.4 support

Based on: https://github.com/pawellen/DataTablesListing

DataTables Listing plugin

Codacy Badge Build Status

Data tables listing plugin allow you to easy creating record list, using Symfony forms style. This plugin use popular JQuery DataTables plug (http://www.datatables.net/)

Installation

  1. Install plugin using composer:

  2. Update Your AppKernel.php html (...) {{ listing_scripts() }} (...) (...)

    twig {% extends "PanelBundle::base_template.html.twig" %}

{% form_theme list.filters _self %}

{% block _my_list_widget %}

{{ form_row(form.name) }}
{{ form_row(form.email) }}

{% endblock _my_list_widget %}

{% block content_body %} {{ listing(list) }} {% endblock %}



To render entire listing, you can use ***listing()*** twig function. This example shows also how to overwrite filters template. Notice that there is a leading underscore in block name.

Functions
===

1. Creating links
---

To create link you need to add ***link*** option inside ***buildListing*** method.

where:
    ***id*** is a ***propertyPath*** string.
    ***route*** is a route name
    ***params*** are parameters to generateUrl function

2. Using QueryBuilder
---

To use query builder you need to use ***query_builder*** option instead of class.

or

3. Using filters
---

By default, when building filters form you don't need to define any filters, you may pass empty array as filter options, in this case
 default search will be performed. Default search use "name LIKE %PHRASE%" sql query, where ***name*** is filter name and ***PHRASE***
 is the value of input. To use custom filter just pass the DQL expression to filter option.
 Example:

where:
    ***expression*** is a DQL expression, You can use parameter multiple times, for example: "u.firstname LIKE :name OR u.lastname LIKE :name".
    ***eval*** is not required parameter it is used to modify value passed from filter form

notice:
    ***:name*** MUST be always same as filter name (in current version)

4. Using query modifications when filter is used
---

In some cases your listing is very simple but there is case when you use some filters you have to add some complicated joins, but in other cases you don't want
 apply that joins to query because they are very expensive.
 Example:

In this example when user fill "Language code" filter, ***join('c.language')*** will be added and languageCode condition will be added to query.

***Deprecated*** parameter joins (used in old version):

In this case country will be joined only if country filter is passed by user, otherwise joins are not used.

5. Buttons
---

Inside ***buildListing*** method you can add action buttons to your list position.
Example:

6. Events
---
When you need dynamically modify/extend table rows or filters search criteria you can use one of listing events.

7. Accessing custom properties via PropertyAccessor
---

When using ***query_bulder*** you can use option ***property*** to access any data from fetched entity. For example:
If you have related entity you can can access its getter threw property accessor:

or you can even can access first object in collection:

listing allow you tu use some magic wildcard ***[*]***, to collect all values in collection and display it as coma
separated string:

***NOTE:*** You can use onlu one wildcard in your property option.

All versions of listing with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
ext-json Version *
symfony/framework-bundle Version >=4.4
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 pawellen/listing contains the following files

Loading the files please wait ....