1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
declare(strict_types=1); |
4
|
|
|
|
5
|
|
|
namespace Flextype\Plugin\Admin\Controllers; |
6
|
|
|
|
7
|
|
|
use Flextype\Component\Filesystem\Filesystem; |
|
|
|
|
8
|
|
|
use Flextype\Component\Session\Session; |
|
|
|
|
9
|
|
|
use Psr\Http\Message\ResponseInterface as Response; |
|
|
|
|
10
|
|
|
use Psr\Http\Message\ServerRequestInterface as Request; |
|
|
|
|
11
|
|
|
use Ramsey\Uuid\Uuid; |
|
|
|
|
12
|
|
|
use function bin2hex; |
13
|
|
|
use function date; |
14
|
|
|
use function Flextype\Component\I18n\__; |
|
|
|
|
15
|
|
|
use function random_bytes; |
16
|
|
|
use function time; |
17
|
|
|
use Flextype\App\Foundation\Container; |
|
|
|
|
18
|
|
|
|
19
|
|
|
class ApiController extends Container |
20
|
|
|
{ |
21
|
|
|
/** |
22
|
|
|
* Index page for API's |
23
|
|
|
* |
24
|
|
|
* @param Request $request PSR7 request |
25
|
|
|
* @param Response $response PSR7 response |
26
|
|
|
*/ |
27
|
|
|
public function index(Request $request, Response $response) : Response |
28
|
|
|
{ |
29
|
|
|
return $this->twig->render( |
30
|
|
|
$response, |
31
|
|
|
'plugins/admin/templates/system/api/index.html', |
32
|
|
|
[ |
33
|
|
|
'menu_item' => 'api', |
34
|
|
|
'api_list' => [ |
35
|
|
|
'entries' => [ |
36
|
|
|
'title' => __('admin_entries'), |
|
|
|
|
37
|
|
|
'icon' => 'fas fa-database' |
38
|
|
|
], |
39
|
|
|
'registry' => [ |
40
|
|
|
'title' => __('admin_registry'), |
41
|
|
|
'icon' => 'fas fa-archive' |
42
|
|
|
], |
43
|
|
|
'images' => [ |
44
|
|
|
'title' => __('admin_images'), |
45
|
|
|
'icon' => 'far fa-images' |
46
|
|
|
], |
47
|
|
|
'files' => [ |
48
|
|
|
'title' => __('admin_files'), |
49
|
|
|
'icon' => 'fas fa-file' |
50
|
|
|
], |
51
|
|
|
'folders' => [ |
52
|
|
|
'title' => __('admin_folders'), |
53
|
|
|
'icon' => 'fas fa-folder' |
54
|
|
|
], |
55
|
|
|
'access' => [ |
56
|
|
|
'title' => __('admin_access'), |
57
|
|
|
'icon' => 'fas fa-user-shield' |
58
|
|
|
], |
59
|
|
|
], |
60
|
|
|
'links' => [ |
61
|
|
|
'api' => [ |
62
|
|
|
'link' => $this->router->pathFor('admin.api.index'), |
63
|
|
|
'title' => __('admin_api'), |
64
|
|
|
'active' => true, |
65
|
|
|
], |
66
|
|
|
], |
67
|
|
|
] |
68
|
|
|
); |
69
|
|
|
} |
70
|
|
|
} |
71
|
|
|
|
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths