... | ... |
@@ -14,12 +14,19 @@ namespace vossmedien\AloxBundle\ContaoManager; |
14 | 14 |
|
15 | 15 |
use Contao\CoreBundle\ContaoCoreBundle; |
16 | 16 |
use Contao\ManagerPlugin\Bundle\BundlePluginInterface; |
17 |
+use Contao\ManagerPlugin\Routing\RoutingPluginInterface; |
|
17 | 18 |
use Contao\ManagerPlugin\Bundle\Config\BundleConfig; |
18 | 19 |
use Contao\ManagerPlugin\Bundle\Parser\ParserInterface; |
20 |
+use Symfony\Component\Config\Loader\LoaderResolverInterface; |
|
21 |
+use Symfony\Component\HttpKernel\KernelInterface; |
|
22 |
+use Symfony\Component\Routing\Loader\YamlFileLoader; |
|
19 | 23 |
use vossmedien\AloxBundle\VossmedienAloxBundle; |
20 | 24 |
|
21 |
-class Plugin implements BundlePluginInterface |
|
25 |
+class Plugin implements BundlePluginInterface, RoutingPluginInterface |
|
22 | 26 |
{ |
27 |
+ /** |
|
28 |
+ * {@inheritdoc} |
|
29 |
+ */ |
|
23 | 30 |
public function getBundles(ParserInterface $parser): array |
24 | 31 |
{ |
25 | 32 |
return [ |
... | ... |
@@ -27,4 +34,19 @@ class Plugin implements BundlePluginInterface |
27 | 34 |
->setLoadAfter([ContaoCoreBundle::class]), |
28 | 35 |
]; |
29 | 36 |
} |
37 |
+ |
|
38 |
+ /** |
|
39 |
+ * {@inheritdoc} |
|
40 |
+ */ |
|
41 |
+ public function getRouteCollection(LoaderResolverInterface $resolver, KernelInterface $kernel) |
|
42 |
+ { |
|
43 |
+ $config = '@VossmedienAloxBundle/config/routing.yml'; |
|
44 |
+ $loader = $resolver->resolve($config, 'yaml'); |
|
45 |
+ |
|
46 |
+ if ($loader instanceof YamlFileLoader) { |
|
47 |
+ return $loader->load($config); |
|
48 |
+ } |
|
49 |
+ |
|
50 |
+ return null; |
|
51 |
+ } |
|
30 | 52 |
} |
... | ... |
@@ -3,11 +3,11 @@ |
3 | 3 |
declare(strict_types=1); |
4 | 4 |
|
5 | 5 |
/* |
6 |
- * This file is part of formilicious bundle for Contao. |
|
6 |
+ * This file is part of alox bundle for Contao. |
|
7 | 7 |
* |
8 | 8 |
* (c) Benjamin Roth |
9 | 9 |
* |
10 |
- * @license LGPL-3.0-or-later |
|
10 |
+ * @license commercial |
|
11 | 11 |
*/ |
12 | 12 |
|
13 | 13 |
namespace vossmedien\AloxBundle\ContaoManager; |
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,30 @@ |
1 |
+<?php |
|
2 |
+ |
|
3 |
+declare(strict_types=1); |
|
4 |
+ |
|
5 |
+/* |
|
6 |
+ * This file is part of formilicious bundle for Contao. |
|
7 |
+ * |
|
8 |
+ * (c) Benjamin Roth |
|
9 |
+ * |
|
10 |
+ * @license LGPL-3.0-or-later |
|
11 |
+ */ |
|
12 |
+ |
|
13 |
+namespace vossmedien\AloxBundle\ContaoManager; |
|
14 |
+ |
|
15 |
+use Contao\CoreBundle\ContaoCoreBundle; |
|
16 |
+use Contao\ManagerPlugin\Bundle\BundlePluginInterface; |
|
17 |
+use Contao\ManagerPlugin\Bundle\Config\BundleConfig; |
|
18 |
+use Contao\ManagerPlugin\Bundle\Parser\ParserInterface; |
|
19 |
+use vossmedien\AloxBundle\VossmedienAloxBundle; |
|
20 |
+ |
|
21 |
+class Plugin implements BundlePluginInterface |
|
22 |
+{ |
|
23 |
+ public function getBundles(ParserInterface $parser): array |
|
24 |
+ { |
|
25 |
+ return [ |
|
26 |
+ BundleConfig::create(VossmedienAloxBundle::class) |
|
27 |
+ ->setLoadAfter([ContaoCoreBundle::class]), |
|
28 |
+ ]; |
|
29 |
+ } |
|
30 |
+} |