Download the PHP package vkrtecek/table without Composer

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

Easy HTML Table generator

License

The library focuses on easy table rendering of arrays of objects. No connections to database, only insert array.

License

The Table library is open-sourced software licensed under the MIT license.

Instalation

Examples

Let's say we have for all examples testing class like below:

Basic usage

If we want to render table with collection of TestObject, do:

The string passed by must be the same string as signature of property's getter without . So for example if the TestObject has method , must pass string or .

And in your View call:

or

so the result will look like

ID of personNameAge
1John38
2Susane35
3Paul13
4Joe25
5Lucia80
6Štěpán29

Advanced

Callbacks

We can specify a callback function instead of property name:

ID of personNameAge
1John38
2Susane35
3Paul13
4John38
5Susane35
6Paul13

Sorting and filtering table data

Sometimes we need sort data by some attribute:

and now by clicking on the table column header, we can sort the rows by this column. Or pass one parameter of type callable to specify the style of sorting.

By typing code below the field for filtering of specific column data will appear:

If we don't want to show all rows and enable paging, which will render input for number of rows:

Column class

Column can has it's own HTML class

Column filtering

Also for filtering by one single column, there is method which pass string - URL attribute:

will after any table action show URL like

and similar for date column

the URL will look like

for filtering column by "between dates".

If one of these filters are set, the button for show/hide the navigation row will appear above the table. If the "SHOW" button is clicked, navigation row will appear as the second THEAD row.

Additional

If we want to sort and filter data by framework (e.g. QueryBuilder) and pass to table only filtered result set, call

and table skip sorting, filtering and paging. By this integer value is also counted number of pages in listing, so insert the right number.

If is need to customize URL, use method like below:

will cause the URL will look after some table click action like

Table is now multilingual and you can pass your own translations:


All versions of table with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0.0
donquixote/cellbrush 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 vkrtecek/table contains the following files

Loading the files please wait ....