Download the PHP package bajzany/table without Composer
On this page you can find all versions of the php package bajzany/table. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download bajzany/table
More information about bajzany/table
Files in bajzany/table
Download bajzany/table
More information about bajzany/table
Files in bajzany/table
Vendor bajzany
Package table
Short Description Table for Nette Framework
License
Homepage https://github.com/bajzany/Table
Package table
Short Description Table for Nette Framework
License
Homepage https://github.com/bajzany/Table
Keywords table
Please rate this library. Is it a good library?
Informations about the package table
Table
Nette Table for baseUsing or DoctrineEntity
Required:
- php: ^7.2
- nette/di
- nette/application
- nette/bootstrap
- latte/latte
- nette/utils
- kdyby/events
- kdyby/doctrine
- bajzany/paginator
- nettpack/stage
Instalation
-
Composer instalation `
- Register into Nette Application
`
- Set translator into table
`
-
Now create component table and his interface, for example:
-
ITestTable class ``
- Component have two options, BaseTable and EntityTable:
BaseTable:
- You must set data manualy
$rowsCollection->add()
``
EntityTable:
- Data into entity table has been set with queryBuilder like
getEntityClass()
``
-
-
getEntityClass
function:- This will be return class of entity
-
In function create you have access to paginator
$this->getPaginator()
- Entity table contain bajzany/paginator, for more detail click on this link
- You can change paginator pageSize, add another items into list pagination.
-
createColumn function:
- Function
$this->createColumn('identificator')
create new col for table in every row - Column have this settings:
setLabel(string)
- Label is for th tag in table, it's only name col
setPattern(string)
- Pattern example( User email {{ email }} ) This show you in field column "User email (specific email from entity user)"
setFooter(string)
- Footer is same as Label, it's only differently position
useComponent("customComponent")
- For rendering component into table
- CallableFunctions:
onBodyCreate[] = callable
- In Callable get this parameters: Item(HtmlObject), Entity
onHeaderCreate[] = callable
- In Callable get this parameters: Item(HtmlObject), Column
onFooterCreate[] = callable
- In Callable get this parameters: Item(HtmlObject), Column
onSearchAction[] = callable
- Must be set
setSearchable(TRUE)
- For create select list
setSearchSelectOptions([])
- for example
['0' => 'No','1' => 'Yes']
- for example
- In Callable get this parameters: Table, InputValue
- Must be set
onSortingAction[] = callable
- Must be set
setSortable(TRUE)
- In Callable get this parameters: Table, SortValue
- Must be set
- Entity table have also callable
onBuildQuery[]
- In Callable get this parameters: EntityTable, QuieryBuilder
- Function
- Now register into Presenter ``
For rendering table use .latte
<div class="box-body">
{control testList}
</div>
{*Paginator section*}
<div class="box-footer clearfix">
{control testList:paginator}
</div>
For register subscriber on table events
- Use @Tag annotation for register new listener on Table
{TableExtensions::TAG_EVENT=EntityClass::class}
- EntityClass::class is entity which you can listening onBuildQuery(EntityTable $entityTable)
- this is event when will be call before render table, just change queryBuilder query for specific select entities ``
All versions of table with dependencies
PHP Build Version
Package Version
Requires
php Version
^7.2
nette/di Version ^2.4
nette/application Version ^2.4
nette/bootstrap Version ^2.4
latte/latte Version ^2.4
nette/utils Version ^2.4
kdyby/events Version ^3.1
kdyby/doctrine Version ^3.3
bajzany/paginator Version ^1.0
nettpack/stage Version ^1.0
nette/di Version ^2.4
nette/application Version ^2.4
nette/bootstrap Version ^2.4
latte/latte Version ^2.4
nette/utils Version ^2.4
kdyby/events Version ^3.1
kdyby/doctrine Version ^3.3
bajzany/paginator Version ^1.0
nettpack/stage Version ^1.0
The package bajzany/table contains the following files
Loading the files please wait ....