|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace LAG\AdminBundle; |
|
4
|
|
|
|
|
5
|
|
|
use LAG\AdminBundle\DependencyInjection\CompilerPass\ApplicationConfigurationCompilerPass; |
|
6
|
|
|
use LAG\AdminBundle\DependencyInjection\CompilerPass\DataProviderCompilerPass; |
|
7
|
|
|
use LAG\AdminBundle\DependencyInjection\CompilerPass\ResourceCompilerPass; |
|
|
|
|
|
|
8
|
|
|
use Symfony\Component\DependencyInjection\ContainerBuilder; |
|
9
|
|
|
use Symfony\Component\HttpKernel\Bundle\Bundle; |
|
10
|
|
|
|
|
11
|
|
|
class LAGAdminBundle extends Bundle |
|
12
|
|
|
{ |
|
13
|
|
|
// CRUD Actions |
|
14
|
|
|
const SERVICE_ID_LIST_ACTION = 'lag.admin.actions.list'; |
|
15
|
|
|
const SERVICE_ID_CREATE_ACTION = 'lag.admin.actions.create'; |
|
16
|
|
|
const SERVICE_ID_EDIT_ACTION = 'lag.admin.actions.edit'; |
|
17
|
|
|
const SERVICE_ID_DELETE_ACTION = 'lag.admin.actions.delete'; |
|
18
|
|
|
|
|
19
|
|
|
const SERVICE_ID_ACTION_FACTORY = 'lag.admin.action_factory'; |
|
20
|
|
|
|
|
21
|
|
|
// Responders |
|
22
|
|
|
const SERVICE_ID_LIST_RESPONDER = 'lag.admin.action.list_responder'; |
|
23
|
|
|
|
|
24
|
|
|
// Form Handlers |
|
25
|
|
|
const SERVICE_ID_EDIT_FORM_HANDLER = 'lag.admin.form.edit_form_handler'; |
|
26
|
|
|
const SERVICE_ID_LIST_FORM_HANDLER = 'lag.admin.form.list_form_handler'; |
|
27
|
|
|
|
|
28
|
|
|
// Service Tags |
|
29
|
|
|
const SERVICE_TAG_FORM_HANDLER = 'lag.admin.form_handler'; |
|
30
|
|
|
|
|
31
|
|
|
// Request Admin parameters |
|
32
|
|
|
// TODO from configuration |
|
33
|
|
|
const REQUEST_PARAMETER_ADMIN = '_admin'; |
|
34
|
|
|
const REQUEST_PARAMETER_ACTION = '_action'; |
|
35
|
|
|
|
|
36
|
|
|
/** |
|
37
|
|
|
* Do not load entities on handleRequest (for create method for example). |
|
38
|
|
|
*/ |
|
39
|
|
|
const LOAD_STRATEGY_NONE = 'strategy_none'; |
|
40
|
|
|
|
|
41
|
|
|
/** |
|
42
|
|
|
* Load one entity on handleRequest (edit method for example). |
|
43
|
|
|
*/ |
|
44
|
|
|
const LOAD_STRATEGY_UNIQUE = 'strategy_unique'; |
|
45
|
|
|
|
|
46
|
|
|
/** |
|
47
|
|
|
* Load multiple entities on handleRequest (list method for example). |
|
48
|
|
|
*/ |
|
49
|
|
|
const LOAD_STRATEGY_MULTIPLE = 'strategy_multiple'; |
|
50
|
|
|
|
|
51
|
|
|
public function build(ContainerBuilder $container) |
|
52
|
|
|
{ |
|
53
|
|
|
$container->addCompilerPass(new DataProviderCompilerPass()); |
|
54
|
|
|
$container->addCompilerPass(new ApplicationConfigurationCompilerPass()); |
|
55
|
|
|
} |
|
56
|
|
|
} |
|
57
|
|
|
|
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