Download the PHP package heimrichhannot/contao-list_widget without Composer

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

Contao List Widget

For contao 4 please use List Widget Bundle

This simple module offers functionality for displaying a list in the Contao backend (either as a dca field or in a backend module).

For visualization the javascript library DataTables is used.

Features

Technical instructions

Usage as a widget in a dca field

Use the inputType "listWidget" for your field.

Usage in a module

Add the following code e.g. in the generate() method of your BackendModule:

Call this in your module's compile method:

Copy the content of list_widget.html5 into your module's template.

Example load_items_callback

Here you can see an example for overriding the core behavior of loadItems():

Config (same structure for DCA -> eval -> listWidget and shortcut functions)

Name Possible value Description
identifier string Needed for distinguishing requests from multiple list widget implementations, e.g.
header_fields array Must return an array containing the header fields. The keys must match the keys of the arrays/objects in items/items_callback.
header_fields_callback callback array, function closure Must return an array containing the header fields. The keys must match the keys of the arrays/objects in items/items_callback.
items array Must return an array containing the items to be displayed. The item keys must match those in header_fields/header_fields_callback.
items_callback callback array, function closure Must return an array containing the items to be displayed. The item keys must match those in header_fields/header_fields_callback.
table string (e.g. "tl_dca") This value is needed for useDbAsHeader and ajax handling
useDbAsHeader boolean Set to true if the header should contain all fields of a certain database entity ("table" is used)
template string Specify a custom template
language array Specify custom localizations (see ListWidget::getLanguage() for details)
language_callback callback array, function closure Specify custom localizations (see ListWidget::getLanguage() for details)
ajax boolean Set to true if ajax reloading should take place (no need for items_callback in this case)
ajaxConfig -> load_items array Override this if custom model options or methods are needed (see ListWidget::loadItems() for details)
ajaxConfig -> load_items_callback callback array, function closure Override this if custom model options or methods are needed (see ListWidget::loadItems() for details)
ajaxConfig -> prepare_items array Override this if custom data preparation is needed (see ListWidget::prepareItems() for details)
ajaxConfig -> prepare_items_callback callback array, function closure Override this if custom data preparation is needed (see ListWidget::prepareItems() for details)

Callbacks

Name Arguments Expected return value Description
headerFields_callback $objDc, $arrDca, $objWidget array containing field and label pairs () This callback must return the headerFields to be displayed in the list. Array keys need to be the keys in items_callback (see list_widget.html5 for explanation).
items_callback $objDc, $arrDca, $objWidget array of entity arrays () This callback must return the items to be displayed in the list
load_callback $arrOptions, [], $objDc, $arrDca, $objWidget data array (see ListWidget::loadItems for more details) Override this method if custom model options or methods are needed
prepare_items_callback $objItems, $arrListOptions, $arrOptions, $objDc, $arrDca, $objWidget data array (see ListWidget::prepareItems for more details) Override this method if custom data preparation is needed

All versions of contao-list_widget with dependencies

PHP Build Version
Package Version
Requires php Version ~5.4 || ~7.0 || ^8.0
contao/core-bundle Version ^3.5.1 || ~4.1
contao-community-alliance/composer-plugin Version ~2.4 || ~3.0
heimrichhannot/contao-request Version ~1.0
heimrichhannot/contao-haste_plus Version ~1.6
heimrichhannot/datatables Version ^1.10
heimrichhannot/datatables-additional Version ^1.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 heimrichhannot/contao-list_widget contains the following files

Loading the files please wait ....