1 <?php
2
3 /*
4 * This file is part of the Icybee package.
5 *
6 * (c) Olivier Laviale <olivier.laviale@gmail.com>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12 namespace Icybee;
13
14 use ICanBoogie\HTTP\Request;
15
16 class EditController extends BlockController
17 {
18 /*
19 public function __invoke(Request $request)
20 {
21 global $core;
22
23 $route = $this->route;
24 $module = $core->modules[$route->module];
25
26 if (!$core->user->has_permission(Module::PERMISSION_ACCESS, $module))
27 {
28 throw new \Exception('fcuk!');
29 }
30
31 $route = $this->route;
32
33 $block = $module->getBlock($route->block, $request['key']);
34 $decorator = (string) new \Icybee\DocumentDecorator(new \Icybee\AdminDecorator($block));
35
36 return $decorator;
37 }
38
39 protected function get_component()
40 {
41 global $core;
42
43 $route = $this->route;
44 $request = $this->request;
45 $module = $core->modules[$route->module];
46
47 return $module->getBlock($route->block, $request['key']);
48 }
49 */
50 }
51