@@ -113,7 +113,7 @@ |
||
113 | 113 | $api_token_dir_path = PATH['project'] . '/tokens/entries/' . $api_token; |
114 | 114 | $api_token_file_path = $api_token_dir_path . '/token.yaml'; |
115 | 115 | |
116 | - if (! Filesystem::has($api_token_file_path)) { |
|
116 | + if (!Filesystem::has($api_token_file_path)) { |
|
117 | 117 | |
118 | 118 | Filesystem::createDir($api_token_dir_path); |
119 | 119 |
@@ -33,30 +33,30 @@ |
||
33 | 33 | 'menu_item' => 'api', |
34 | 34 | 'api_list' => [ |
35 | 35 | 'entries' => [ |
36 | - 'title' => __('admin_entries'), |
|
37 | - 'icon' => 'fas fa-database' |
|
36 | + 'title' => __('admin_entries'), |
|
37 | + 'icon' => 'fas fa-database' |
|
38 | 38 | ], |
39 | 39 | 'registry' => [ |
40 | - 'title' => __('admin_registry'), |
|
41 | - 'icon' => 'fas fa-archive' |
|
40 | + 'title' => __('admin_registry'), |
|
41 | + 'icon' => 'fas fa-archive' |
|
42 | 42 | ], |
43 | 43 | 'images' => [ |
44 | - 'title' => __('admin_images'), |
|
45 | - 'icon' => 'far fa-images' |
|
44 | + 'title' => __('admin_images'), |
|
45 | + 'icon' => 'far fa-images' |
|
46 | 46 | ], |
47 | 47 | 'files' => [ |
48 | - 'title' => __('admin_files'), |
|
49 | - 'icon' => 'fas fa-file' |
|
48 | + 'title' => __('admin_files'), |
|
49 | + 'icon' => 'fas fa-file' |
|
50 | 50 | ], |
51 | 51 | 'folders' => [ |
52 | - 'title' => __('admin_folders'), |
|
53 | - 'icon' => 'fas fa-folder' |
|
52 | + 'title' => __('admin_folders'), |
|
53 | + 'icon' => 'fas fa-folder' |
|
54 | 54 | ], |
55 | 55 | 'access' => [ |
56 | - 'title' => __('admin_access'), |
|
57 | - 'icon' => 'fas fa-user-shield' |
|
56 | + 'title' => __('admin_access'), |
|
57 | + 'icon' => 'fas fa-user-shield' |
|
58 | + ], |
|
58 | 59 | ], |
59 | - ], |
|
60 | 60 | 'links' => [ |
61 | 61 | 'api' => [ |
62 | 62 | 'link' => $this->router->pathFor('admin.api.index'), |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | 'create' => [ |
122 | 122 | 'link' => 'javascript:;', |
123 | 123 | 'title' => __('admin_create_new_entry'), |
124 | - 'onclick' => 'event.preventDefault(); selectEntryType("'.$this->getEntryID($query).'", 0);' |
|
124 | + 'onclick' => 'event.preventDefault(); selectEntryType("' . $this->getEntryID($query) . '", 0);' |
|
125 | 125 | ] |
126 | 126 | ] |
127 | 127 | ] |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | $parts = [0 => '']; |
149 | 149 | } |
150 | 150 | |
151 | - $type = isset($query['type']) ? $query['type']: ''; |
|
151 | + $type = isset($query['type']) ? $query['type'] : ''; |
|
152 | 152 | |
153 | 153 | return $this->twig->render( |
154 | 154 | $response, |
@@ -246,7 +246,7 @@ discard block |
||
246 | 246 | if ($this->registry->has('plugins.site')) { |
247 | 247 | $template_path = PATH['project'] . '/themes/' . $this->registry->get('plugins.site.settings.theme') . '/templates/' . $data['fieldset'] . '.html'; |
248 | 248 | $template = (Filesystem::has($template_path)) ? $data['fieldset'] : 'default'; |
249 | - $data_from_post['template'] = $template; |
|
249 | + $data_from_post['template'] = $template; |
|
250 | 250 | } |
251 | 251 | |
252 | 252 | //foreach ($fieldset['sections'] as $section_name => $section_body) { |
@@ -717,7 +717,7 @@ discard block |
||
717 | 717 | |
718 | 718 | ], |
719 | 719 | 'edit_entry' => [ |
720 | - 'link' => $this->router->pathFor('admin.entries.edit') . '?id=' . $this->getEntryID($query). '&type=editor', |
|
720 | + 'link' => $this->router->pathFor('admin.entries.edit') . '?id=' . $this->getEntryID($query) . '&type=editor', |
|
721 | 721 | 'title' => __('admin_editor'), |
722 | 722 | |
723 | 723 | ], |
@@ -868,14 +868,14 @@ discard block |
||
868 | 868 | $data = $request->getParsedBody(); |
869 | 869 | |
870 | 870 | // Delete system fields |
871 | - isset($data['slug']) and Arrays::delete($data, 'slug'); |
|
872 | - isset($data['csrf_value']) and Arrays::delete($data, 'csrf_value'); |
|
873 | - isset($data['csrf_name']) and Arrays::delete($data, 'csrf_name'); |
|
874 | - isset($data['form-save-action']) and Arrays::delete($data, 'form-save-action'); |
|
875 | - isset($data['trumbowyg-icons-path']) and Arrays::delete($data, 'trumbowyg-icons-path'); |
|
876 | - isset($data['trumbowyg-locale']) and Arrays::delete($data, 'trumbowyg-locale'); |
|
871 | + isset($data['slug']) and Arrays::delete($data, 'slug'); |
|
872 | + isset($data['csrf_value']) and Arrays::delete($data, 'csrf_value'); |
|
873 | + isset($data['csrf_name']) and Arrays::delete($data, 'csrf_name'); |
|
874 | + isset($data['form-save-action']) and Arrays::delete($data, 'form-save-action'); |
|
875 | + isset($data['trumbowyg-icons-path']) and Arrays::delete($data, 'trumbowyg-icons-path'); |
|
876 | + isset($data['trumbowyg-locale']) and Arrays::delete($data, 'trumbowyg-locale'); |
|
877 | 877 | isset($data['flatpickr-date-format']) and Arrays::delete($data, 'flatpickr-date-format'); |
878 | - isset($data['flatpickr-locale']) and Arrays::delete($data, 'flatpickr-locale'); |
|
878 | + isset($data['flatpickr-locale']) and Arrays::delete($data, 'flatpickr-locale'); |
|
879 | 879 | |
880 | 880 | |
881 | 881 | $data['published_by'] = Session::get('uuid'); |
@@ -899,7 +899,7 @@ discard block |
||
899 | 899 | |
900 | 900 | if (isset($data['routable'])) { |
901 | 901 | $data['routable'] = (bool) $data['routable']; |
902 | - } elseif(isset($entry['routable'])) { |
|
902 | + } elseif (isset($entry['routable'])) { |
|
903 | 903 | $data['routable'] = (bool) $entry['routable']; |
904 | 904 | } else { |
905 | 905 | $data['routable'] = true; |
@@ -113,7 +113,7 @@ |
||
113 | 113 | $api_token_dir_path = PATH['project'] . '/tokens/folders/' . $api_token; |
114 | 114 | $api_token_file_path = $api_token_dir_path . '/token.yaml'; |
115 | 115 | |
116 | - if (! Filesystem::has($api_token_file_path)) { |
|
116 | + if (!Filesystem::has($api_token_file_path)) { |
|
117 | 117 | |
118 | 118 | Filesystem::createDir($api_token_dir_path); |
119 | 119 |
@@ -113,7 +113,7 @@ |
||
113 | 113 | $api_token_dir_path = PATH['project'] . '/tokens/registry/' . $api_token; |
114 | 114 | $api_token_file_path = $api_token_dir_path . '/token.yaml'; |
115 | 115 | |
116 | - if (! Filesystem::has($api_token_file_path)) { |
|
116 | + if (!Filesystem::has($api_token_file_path)) { |
|
117 | 117 | |
118 | 118 | Filesystem::createDir($api_token_dir_path); |
119 | 119 |
@@ -113,7 +113,7 @@ |
||
113 | 113 | $api_token_dir_path = PATH['project'] . '/tokens/files/' . $api_token; |
114 | 114 | $api_token_file_path = $api_token_dir_path . '/token.yaml'; |
115 | 115 | |
116 | - if (! Filesystem::has($api_token_file_path)) { |
|
116 | + if (!Filesystem::has($api_token_file_path)) { |
|
117 | 117 | |
118 | 118 | Filesystem::createDir($api_token_dir_path); |
119 | 119 |
@@ -93,7 +93,7 @@ |
||
93 | 93 | $app->post('/api/access/delete', 'ApiAccessController:deleteProcess')->setName('admin.api_access.deleteProcess'); |
94 | 94 | |
95 | 95 | })->add(new AclIsUserLoggedInMiddleware(['container' => $flextype, 'redirect' => 'admin.accounts.login'])) |
96 | - ->add(new AclIsUserLoggedInRolesInMiddleware(['container' => $flextype, |
|
96 | + ->add(new AclIsUserLoggedInRolesInMiddleware(['container' => $flextype, |
|
97 | 97 | 'redirect' => ($flextype->acl->isUserLoggedIn() ? 'admin.accounts.no-access' : 'admin.accounts.login'), |
98 | 98 | 'roles' => 'admin'])) |
99 | - ->add('csrf'); |
|
99 | + ->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 | -$app->group('/' . $admin_route, function () use ($app, $flextype) : void { |
|
8 | +$app->group('/' . $admin_route, function() use ($app, $flextype) : void { |
|
9 | 9 | // Dashboard |
10 | 10 | $app->get('', 'DashboardController:index')->setName('admin.dashboard.index'); |
11 | 11 |
@@ -31,9 +31,9 @@ discard block |
||
31 | 31 | |
32 | 32 | // Add Admin Navigation |
33 | 33 | $flextype->registry->set('plugins.admin.settings.navigation.content.entries', ['title' => __('admin_entries'), 'icon' => 'fas fa-database', 'link' => $flextype->router->pathFor('admin.entries.index')]); |
34 | -$flextype->registry->set('plugins.admin.settings.navigation.extends.plugins', ['title' => __('admin_plugins'),'icon' => 'fas fa-plug', 'link' => $flextype->router->pathFor('admin.plugins.index')]); |
|
35 | -$flextype->registry->set('plugins.admin.settings.navigation.system.tools', ['title' => __('admin_tools'),'icon' => 'fas fa-toolbox', 'link' => $flextype->router->pathFor('admin.tools.index')]); |
|
36 | -$flextype->registry->set('plugins.admin.settings.navigation.system.api', ['title' => __('admin_api'),'icon' => 'fas fa-network-wired', 'link' => $flextype->router->pathFor('admin.api.index')]); |
|
34 | +$flextype->registry->set('plugins.admin.settings.navigation.extends.plugins', ['title' => __('admin_plugins'), 'icon' => 'fas fa-plug', 'link' => $flextype->router->pathFor('admin.plugins.index')]); |
|
35 | +$flextype->registry->set('plugins.admin.settings.navigation.system.tools', ['title' => __('admin_tools'), 'icon' => 'fas fa-toolbox', 'link' => $flextype->router->pathFor('admin.tools.index')]); |
|
36 | +$flextype->registry->set('plugins.admin.settings.navigation.system.api', ['title' => __('admin_api'), 'icon' => 'fas fa-network-wired', 'link' => $flextype->router->pathFor('admin.api.index')]); |
|
37 | 37 | |
38 | 38 | /** |
39 | 39 | * Add Assets |
@@ -50,50 +50,50 @@ discard block |
||
50 | 50 | array_merge($_admin_js, |
51 | 51 | ['project/plugins/admin/assets/dist/js/admin-vendor-build.min.js'])); |
52 | 52 | |
53 | -$flextype['DashboardController'] = static function ($container) { |
|
53 | +$flextype['DashboardController'] = static function($container) { |
|
54 | 54 | return new DashboardController($container); |
55 | 55 | }; |
56 | 56 | |
57 | -$flextype['SettingsController'] = static function ($container) { |
|
57 | +$flextype['SettingsController'] = static function($container) { |
|
58 | 58 | return new SettingsController($container); |
59 | 59 | }; |
60 | 60 | |
61 | -$flextype['PluginsController'] = static function ($container) { |
|
61 | +$flextype['PluginsController'] = static function($container) { |
|
62 | 62 | return new PluginsController($container); |
63 | 63 | }; |
64 | 64 | |
65 | -$flextype['EntriesController'] = static function ($container) { |
|
65 | +$flextype['EntriesController'] = static function($container) { |
|
66 | 66 | return new EntriesController($container); |
67 | 67 | }; |
68 | 68 | |
69 | -$flextype['ToolsController'] = static function ($container) { |
|
69 | +$flextype['ToolsController'] = static function($container) { |
|
70 | 70 | return new ToolsController($container); |
71 | 71 | }; |
72 | 72 | |
73 | -$flextype['ApiController'] = static function ($container) { |
|
73 | +$flextype['ApiController'] = static function($container) { |
|
74 | 74 | return new ApiController($container); |
75 | 75 | }; |
76 | 76 | |
77 | -$flextype['ApiEntriesController'] = static function ($container) { |
|
77 | +$flextype['ApiEntriesController'] = static function($container) { |
|
78 | 78 | return new ApiEntriesController($container); |
79 | 79 | }; |
80 | 80 | |
81 | -$flextype['ApiFilesController'] = static function ($container) { |
|
81 | +$flextype['ApiFilesController'] = static function($container) { |
|
82 | 82 | return new ApiFilesController($container); |
83 | 83 | }; |
84 | 84 | |
85 | -$flextype['ApiFoldersController'] = static function ($container) { |
|
85 | +$flextype['ApiFoldersController'] = static function($container) { |
|
86 | 86 | return new ApiFoldersController($container); |
87 | 87 | }; |
88 | 88 | |
89 | -$flextype['ApiImagesController'] = static function ($container) { |
|
89 | +$flextype['ApiImagesController'] = static function($container) { |
|
90 | 90 | return new ApiImagesController($container); |
91 | 91 | }; |
92 | 92 | |
93 | -$flextype['ApiAccessController'] = static function ($container) { |
|
93 | +$flextype['ApiAccessController'] = static function($container) { |
|
94 | 94 | return new ApiAccessController($container); |
95 | 95 | }; |
96 | 96 | |
97 | -$flextype['ApiRegistryController'] = static function ($container) { |
|
97 | +$flextype['ApiRegistryController'] = static function($container) { |
|
98 | 98 | return new ApiRegistryController($container); |
99 | 99 | }; |