dev-master
9999999-devZF2 module used to facilitate crud operations on doctrine entities.
MIT
The Requires
- php >=5.3.3
- zendframework/zendframework 2.*
crud zf2
Wallogit.com
2017 © Pedro Peláez
ZF2 module used to facilitate crud operations on doctrine entities.
Base module to extend to simplify crud development., (*2)
The suggested installation method is via composer:, (*3)
php composer.phar require girafa/crud:dev-master
or, (*4)
Add this project in your composer.json:, (*5)
"require": {
"girafa/crud": "dev-master"
}
Now tell composer to download Girafa\Crud by running the command:, (*6)
$ php composer.phar update
Clone this project into your ./vendor/ directory, (*7)
```sh cd vendor git clone https://github.com/girafacomunicacao/girafa-crud.git ```
Copy ./vendor/girafa/crud/config/module.config.php to ./config/autoload/crud.global.php
This configuration parameters applies to all modules that use Crud, (*8)
Add in module/YourModule/config/config.php a section like this, (*9)
'Crud' => array(
__NAMESPACE__ => array(
's_indexTitle' => 'Index page default',
's_indexTemplate' => 'crud/index/index',
's_newTitle' => 'New page default',
's_newTemplate' => 'crud/index/default-form',
's_editTitle' => 'Edit page default',
's_editTemplate' => 'crud/index/default-form',
's_detailTitle' => 'Detail page default',
's_detailTemplate' => 'crud/index/detail',
's_processErrorTitle' => 'Form errors page default',
's_processErrorTemplate' => 'crud/index/default-form',
's_deleteRouteRedirect' => 'crud',
's_processRouteRedirect' => 'crud',
)
)
This configuration parameters applies to all controller extending Crud defined in that namespace, (*10)
Redefine in your controller parameters you want to edit after call Crud constructor like, (*11)
class IndexController extends \Girafa\Crud\Controller\CrudIndexController {
public function __construct($I_service, $I_form) {
$entityName = 'Dog';
parent::__construct($entityName, $I_service, $I_form);
$this->s_indexTitle = 'Title specific for this controller';
}
}
ZF2 module used to facilitate crud operations on doctrine entities.
MIT
crud zf2