Download the PHP package t4web/crud without Composer
On this page you can find all versions of the php package t4web/crud. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package crud
Short Description ZF2 Module. Abstract layer for manage domain entity
License BSD-3-Clause
Homepage https://github.com/t4web/Crud
Informations about the package crud
Crud
ZF2 Module. Abstract layer for manage domain entity
Contents
- Installation
- Post installation
- Introduction
- Configuration options
Installation
Add this project in your composer.json:
Now tell composer to download T4web\Crud by running the command:
Post installation
Enabling it in your application.config.phpfile.
Introduction
This module generate CRUD routes and provides basic CRUD methods and customization it. In our vision CRUD contain 6 actions:
new- action, which display form for new entry,create- action, which receive array of entry values, it validate values and create entity,read- action, which display one entity, it validate criteria param and entry exists,update- action, which receive array of entry values, it validate criteria param and entry exists and validate values + update entity,delete- action, which delete one entity, it validate criteria param and entry exists,list- action, which display entities by criteria (filter)
Also this module provide Abstract factories for creating Domain services by short alias:
ENTITY_NAME-crud-create-service-T4webDomain\Service\Creatorwill be createdENTITY_NAME-crud-read-service-T4web\Crud\Service\ReadServicewill be createdENTITY_NAME-crud-update-service-T4webDomain\Service\Updaterwill be createdENTITY_NAME-crud-delete-service-T4webDomain\Service\Deleterwill be createdENTITY_NAME-crud-list-service-T4web\Crud\Service\ListServicewill be created
Configuration options
For use T4web\Crud featuers you must define route-generation config:
where entity - entity name for URI (for example: /backend/user/new, '/backend/user/create'...),
actions - define which actions will be processed, if you not define delete action, delete URI will not created,
options - define custom options for each action (see sebaks/zend-mvc-controller)
For current config will be created this routes:
All versions of crud with dependencies
zendframework/zend-eventmanager Version >=2.6
zendframework/zend-http Version >=2.6
zendframework/zend-modulemanager Version >=2.6
zendframework/zend-mvc Version >=2.6
zendframework/zend-view Version >=2.6
sebaks/controller Version ~0.1.0
t4web/domain Version ~1.2.0