/** * @author Anton Shevchuk * @created 04.09.12 11:21 */ /** * @namespace */ namespace Application; use Application\Roles; use Bluz\Controller\Controller; use Bluz\Controller\Mapper\Crud; /** * @accept HTML * @accept JSON * @privilege Management * * @return mixed */ return function () { /** * @var Controller $this */ $crud = new Crud(); $crud->setCrud(Roles\Crud::getInstance()); $crud->get('system', 'crud/get', 'Read'); $crud->post('system', 'crud/post', 'Create'); $crud->put('system', 'crud/put', 'Update'); $crud->delete('system', 'crud/delete', 'Delete'); return $crud->run(); };
<?php /** * @author Anton Shevchuk * @created 30.10.12 09:29 */ namespace Application; use Application\Users; use Bluz\Controller\Controller; use Bluz\Controller\Mapper\Crud; /** * @accept HTML * @accept JSON * @privilege Management * * @return array */ return function () { /** * @var Controller $this */ $crud = new Crud(); $crud->setCrud(Users\Crud::getInstance()); $crud->get('system', 'crud/get'); $crud->post('system', 'crud/post'); $crud->put('system', 'crud/put'); $crud->delete('system', 'crud/delete'); return $crud->run(); };
* @category Application * * @author Anton Shevchuk * @created 09.11.12 13:19 */ namespace Application; use Application\Users; use Bluz\Controller\Controller; use Bluz\Controller\Mapper\Crud; use Bluz\Proxy\Request; /** * @accept JSON * @accept HTML * * @return array */ return function () { /** * @var Controller $this */ // change layout if (!Request::isXmlHttpRequest()) { $this->useLayout('small.phtml'); } $crud = new Crud(); $crud->setCrud(Users\Crud::getInstance()); $crud->addMap('GET', 'system', 'crud/get'); $crud->addMap('POST', 'system', 'crud/post'); return $crud->run(); };