Download the PHP package codekanzlei/cake-list-filter without Composer

On this page you can find all versions of the php package codekanzlei/cake-list-filter. 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 cake-list-filter

CakePHP 3 List Filter Plugin

Build Status

A CakePHP 3 plugin which provides an easy way to create filters for CRUD lists. The plugin will dynamically render the markup necessary and manipulate the controller's $paginate config dynamically.

Installation

composer require "codekanzlei/cake-list-filter": "dev-master"

In your App's config/bootstrap.php load the plugin:

In your AppController, or in the controller where you'd like to use ListFilter, load the ListFilterComponent and ListFilterHelper.

Usage

You define filterable fields right in the controller where the pagination happens. This ensures that only the fields you configured can be used for searching, also this automates the generation of the form necessary.

You can either define the fields as the $listFilter property in your controller, or implement a getListFilters() callback method.

Multiple listFilters in one controller are possible, as the config is separated by the controller action. In this example we assume you want to have a ListFilter in your controller action index.

Configuring the ListFilters via the callback method provides more flexibility, as it allows to have code executed, which is not possible in a class property.

We assume that the index controller action looks like this:

Now, in your index.ctp view file you can render the filter box like this:

Your filter box will look like this:

filterbox

Options

searchType

This can be one of the following:

inputOptions

These options will be used to render the form field using FormHelper::input(). So in here, you can set the label, add classes to the input, etc.

searchTermsConjunction

Setting up the component, you may give an additional options array to overwrite the default config. Especially interesting is searchTermsConjunction, which is 'AND' by default and means, that multiple terms in a fulltext search will be added to the pagination conditions with an AND conjunction between them to narrow down the search results.

If you wish to broaden the results by connecting the terms with OR, you can setup the component like so:

Handling many-to-many relations

To handle many-to-many relations, like Users BelongsToMany Groups, you have to build a custom query and pass it to the Paginator, as the Paginator by default can't handle many-to-many relations.

Customization

If you need a custom layout for your filterbox, you can construct the filter box individually like you please. Every element of the listFilter can be rendered individually:

Also, you can manipulate default templates and classes used by calling ListFilterHelper::config() with your overrides. These are the options available:


All versions of cake-list-filter with dependencies

PHP Build Version
Package Version
Requires php Version ~7.1
cakephp/cakephp Version >=3.0
cakephp/plugin-installer Version *
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 codekanzlei/cake-list-filter contains the following files

Loading the files please wait ....