@@ 35-61 (lines=27) @@ | ||
32 | /** |
|
33 | * @param ContainerInterface|string $multilanguage |
|
34 | */ |
|
35 | public function __construct(/*ContainerInterface|RequestStack*/ $requestStack, $multilanguage = null, $defaultLocale = null, $requiredLocales = null) |
|
36 | { |
|
37 | if ($requestStack instanceof ContainerInterface) { |
|
38 | @trigger_error('Container injection and the usage of the container is deprecated in KunstmaanNodeBundle 5.1 and will be removed in KunstmaanNodeBundle 6.0.', E_USER_DEPRECATED); |
|
39 | ||
40 | $this->container = $requestStack; |
|
41 | $this->multiLanguage = $this->container->getParameter( |
|
42 | 'multilanguage' |
|
43 | ); |
|
44 | $this->defaultLocale = $this->container->getParameter( |
|
45 | 'defaultlocale' |
|
46 | ); |
|
47 | $this->requiredLocales = explode( |
|
48 | '|', |
|
49 | $this->container->getParameter('requiredlocales') |
|
50 | ); |
|
51 | $this->requestStack = $this->container->get('request_stack'); |
|
52 | ||
53 | return; |
|
54 | } |
|
55 | ||
56 | $this->requestStack = $requestStack; |
|
57 | $this->multiLanguage = $multilanguage; |
|
58 | $this->defaultLocale = $defaultLocale; |
|
59 | ||
60 | $this->requiredLocales = explode('|', $requiredLocales); |
|
61 | } |
|
62 | ||
63 | /** |
|
64 | * @return string |
@@ 66-91 (lines=26) @@ | ||
63 | * |
|
64 | * @param ContainerInterface $container |
|
65 | */ |
|
66 | public function __construct( |
|
67 | /* DomainConfigurationInterface */ $domainConfiguration, |
|
68 | RequestStack $requestStack = null, |
|
69 | EntityManagerInterface $em = null, |
|
70 | $adminKey = null |
|
71 | ) |
|
72 | { |
|
73 | $this->slugPattern = "[a-zA-Z0-9\-_\/]*"; |
|
74 | ||
75 | if ($domainConfiguration instanceof ContainerInterface) { |
|
76 | @trigger_error('Container injection and the usage of the container is deprecated in KunstmaanNodeBundle 5.1 and will be removed in KunstmaanNodeBundle 6.0.', E_USER_DEPRECATED); |
|
77 | ||
78 | $this->container = $domainConfiguration; |
|
79 | $this->domainConfiguration = $this->container->get('kunstmaan_admin.domain_configuration'); |
|
80 | $this->adminKey = $this->container->getParameter('kunstmaan_admin.admin_prefix'); |
|
81 | $this->requestStack = $this->container->get('request_stack'); |
|
82 | $this->em = $this->container->get('doctrine.orm.entity_manager'); |
|
83 | ||
84 | return; |
|
85 | } |
|
86 | ||
87 | $this->domainConfiguration = $domainConfiguration; |
|
88 | $this->adminKey = $adminKey; |
|
89 | $this->requestStack = $requestStack; |
|
90 | $this->em = $em; |
|
91 | } |
|
92 | ||
93 | /** |
|
94 | * Match given urls via the context to the routes we defined. |