vendor/pec-platform/company-bundle/Pec/Bundle/CompanyBundle/PecCompanyBundle.php line 24

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. /*
  4.  * This file is part of the PEC Platform CompanyBundle.
  5.  *
  6.  * (c) PEC project engineers & consultants
  7.  *
  8.  * For the full copyright and license information, please view the LICENSE
  9.  * file that was distributed with this source code.
  10.  */
  11. namespace Pec\Bundle\CompanyBundle;
  12. use Pec\Bundle\CompanyBundle\Service\CompanyFunction\CompanyFunctionCompilerPass;
  13. use Pec\Bundle\CompanyBundle\Service\CompanyFunction\ICompanyFunction;
  14. use Pec\Bundle\PlatformBundle\PecPlatformBundle;
  15. use Symfony\Component\DependencyInjection\ContainerBuilder;
  16. use Symfony\Component\HttpKernel\Bundle\Bundle;
  17. /**
  18.  * The Company bundle provides basic functionality to handle different companies as customer or competitor
  19.  */
  20. class PecCompanyBundle extends Bundle {
  21.     public static function getRequiredBundles(string $env, array &$requiredBundles = []): array {
  22.         if(isset($requiredBundles['PecCompanyBundle'])) {
  23.             return $requiredBundles;
  24.         }
  25.         $requiredBundles['PecCompanyBundle'] = PecCompanyBundle::class;
  26.         PecPlatformBundle::getRequiredBundles($env$requiredBundles);
  27.         return $requiredBundles;
  28.     }
  29.     public function build(ContainerBuilder $container) {
  30.         $container->addCompilerPass(new CompanyFunctionCompilerPass());
  31.         $container->registerForAutoconfiguration(ICompanyFunction::class)->addTag(ICompanyFunction::SERVICE_TAG_ID);
  32.     }
  33. }