Completed
Pull Request — master (#154)
by Arnaud
03:59
created

LAGAdminBundle   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 44
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 17
c 1
b 0
f 0
dl 0
loc 44
ccs 0
cts 3
cp 0
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A build() 0 4 1
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;
0 ignored issues
show
Bug introduced by
The type LAG\AdminBundle\Dependen...ss\ResourceCompilerPass was not found. Maybe you did not declare it correctly or list all dependencies?

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:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
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