first commit
This commit is contained in:
20
bundles/External/PompoBundle/DependencyInjection/Compiler/UnregisterUnwantedServicesPass.php
vendored
Normal file
20
bundles/External/PompoBundle/DependencyInjection/Compiler/UnregisterUnwantedServicesPass.php
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace External\PompoBundle\DependencyInjection\Compiler;
|
||||
|
||||
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
|
||||
class UnregisterUnwantedServicesPass implements CompilerPassInterface
|
||||
{
|
||||
public function process(ContainerBuilder $container)
|
||||
{
|
||||
// kvuli nejhracce, ktera nema bonus program, ale ma vratky, takze to zacne loadovat predefinovany bonus computer
|
||||
// a padne to na dalsich dependencich, takze to proste v pripade chybejiciho modulu odeberu a je to :)
|
||||
if (!findModule(\Modules::BONUS_PROGRAM)) {
|
||||
$container->removeDefinition('KupShop\BonusProgramBundle\Utils\BonusComputer');
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user