@@ -13,15 +13,15 @@ |
||
| 13 | 13 | /** |
| 14 | 14 | * Flextype Application |
| 15 | 15 | */ |
| 16 | - protected $flextype; |
|
| 16 | + protected $flextype; |
|
| 17 | 17 | |
| 18 | 18 | /** |
| 19 | 19 | * __construct |
| 20 | 20 | */ |
| 21 | - public function __construct($flextype) |
|
| 22 | - { |
|
| 23 | - $this->flextype = $flextype; |
|
| 24 | - } |
|
| 21 | + public function __construct($flextype) |
|
| 22 | + { |
|
| 23 | + $this->flextype = $flextype; |
|
| 24 | + } |
|
| 25 | 25 | |
| 26 | 26 | public function index($request, $response) |
| 27 | 27 | { |
@@ -17,9 +17,9 @@ |
||
| 17 | 17 | use function Flextype\Component\I18n\__; |
| 18 | 18 | |
| 19 | 19 | // Add Admin Navigation |
| 20 | -$flextype->container('registry')->set('plugins.admin.settings.navigation.extends.fieldsets', ['title' => __('form_admin_fieldsets'),'icon' => 'far fa-list-alt', 'link' => $flextype->container('router')->pathFor('admin.fieldsets.index')]); |
|
| 20 | +$flextype->container('registry')->set('plugins.admin.settings.navigation.extends.fieldsets', ['title' => __('form_admin_fieldsets'), 'icon' => 'far fa-list-alt', 'link' => $flextype->container('router')->pathFor('admin.fieldsets.index')]); |
|
| 21 | 21 | |
| 22 | 22 | // Add FieldsetsController |
| 23 | -$flextype->container()['FieldsetsController'] = static function () use ($flextype) { |
|
| 23 | +$flextype->container()['FieldsetsController'] = static function() use ($flextype) { |
|
| 24 | 24 | return new FieldsetsController($flextype); |
| 25 | 25 | }; |
@@ -17,6 +17,6 @@ |
||
| 17 | 17 | $flextype->post('/fieldsets/delete', 'FieldsetsController:deleteProcess')->setName('admin.fieldsets.deleteProcess'); |
| 18 | 18 | |
| 19 | 19 | })->add(new AclIsUserLoggedInMiddleware($flextype, ['redirect' => 'admin.accounts.login'])) |
| 20 | - ->add(new AclIsUserLoggedInRolesInMiddleware($flextype, ['redirect' => ($flextype->getContainer()->acl->isUserLoggedIn() ? 'admin.accounts.no-access' : 'admin.accounts.login'), |
|
| 21 | - 'roles' => 'admin'])) |
|
| 22 | - ->add('csrf'); |
|
| 20 | + ->add(new AclIsUserLoggedInRolesInMiddleware($flextype, ['redirect' => ($flextype->getContainer()->acl->isUserLoggedIn() ? 'admin.accounts.no-access' : 'admin.accounts.login'), |
|
| 21 | + 'roles' => 'admin'])) |
|
| 22 | + ->add('csrf'); |
|
@@ -5,7 +5,7 @@ |
||
| 5 | 5 | use Flextype\Plugin\Acl\Middlewares\AclIsUserLoggedInMiddleware; |
| 6 | 6 | use Flextype\Plugin\Acl\Middlewares\AclIsUserLoggedInRolesInMiddleware; |
| 7 | 7 | |
| 8 | -$flextype->group('/' . $admin_route, function () use ($flextype) { |
|
| 8 | +$flextype->group('/' . $admin_route, function() use ($flextype) { |
|
| 9 | 9 | $flextype->get('/fieldsets', 'FieldsetsController:index')->setName('admin.fieldsets.index'); |
| 10 | 10 | $flextype->get('/fieldsets/add', 'FieldsetsController:add')->setName('admin.fieldsets.add'); |
| 11 | 11 | $flextype->post('/fieldsets/add', 'FieldsetsController:addProcess')->setName('admin.fieldsets.addProcess'); |