Mvc/ControllerCrud.php

This file is part of Vegas package.

Default usage: class MyController extends Controller\Crud {

 protected $formName = 'My\Forms\My';    // default form used by CRUD
 protected $modelName = 'My\Models\My';  // default model used by CRUD

 public function initialize()
 {
     parent::initialize();

     // we can also add this event in the Module.php to the dispatcher
     $this->dispatcher->getEventsManager()->attach(
         Controller\Crud\Events::AFTER_CREATE, function() {
             $this->response->redirect('user-admin/index');
         }
     );

     // attach more events
 }

 // other actions

}

The list of fired events is located in \Vegas\Mvc\Controller\Crud\Events class.

Classes

Crud Class Crud