Example #1
0
/**
 * @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();
};
Example #2
0
<?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();
};
Example #3
0
/**
 * CRUD for pages
 *
 * @author   Anton Shevchuk
 * @created  30.10.12 09:29
 */
namespace Application;

use Application\Pages;
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(Pages\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();
};