add dependencies

This commit is contained in:
2021-04-20 23:07:03 +02:00
parent 124cd52cc1
commit 891d8acf20
3 changed files with 10 additions and 37 deletions

View File

@@ -12,19 +12,22 @@ declare(strict_types=1);
namespace Jr\FalsBundle\ContaoManager;
use Jr\FalsBundle\JrFalsBundle;
use Contao\CoreBundle\ContaoCoreBundle;
use Contao\ManagerPlugin\Bundle\BundlePluginInterface;
use Contao\ManagerPlugin\Bundle\Config\BundleConfig;
use Contao\ManagerPlugin\Bundle\Parser\ParserInterface;
use Jr\FalsBundle\JrFalsBundle;
use Contao\NewsBundle\ContaoNewsBundle;
class Plugin implements BundlePluginInterface
{
public function getBundles(ParserInterface $parser)
{
return [
BundleConfig::create(JrFalsBundle::class)
->setLoadAfter([ContaoCoreBundle::class]),
BundleConfig::create(JrFalsBundle::class)->setLoadAfter([
ContaoCoreBundle::class,
ContaoNewsBundle::class
]),
];
}
}

View File

@@ -1,31 +0,0 @@
<?php
declare(strict_types=1);
/*
* This file is part of [package name].
*
* (c) John Doe
*
* @license LGPL-3.0-or-later
*/
namespace Jr\FalsBundle\DependencyInjection;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Extension\Extension;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
class JrFalsExtension extends Extension
{
public function load(array $mergedConfig, ContainerBuilder $container): void
{
$loader = new YamlFileLoader(
$container,
new FileLocator(__DIR__.'/../Resources/config')
);
$loader->load('services.yml');
}
}