vendor/stinger-soft/entity-search-bundle/StingerSoftEntitySearchBundle.php line 23

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. /*
  4.  * This file is part of the Stinger Entity Search package.
  5.  *
  6.  * (c) Oliver Kotte <oliver.kotte@stinger-soft.net>
  7.  * (c) Florian Meyer <florian.meyer@stinger-soft.net>
  8.  *
  9.  * For the full copyright and license information, please view the LICENSE
  10.  * file that was distributed with this source code.
  11.  */
  12. namespace StingerSoft\EntitySearchBundle;
  13. use StingerSoft\EntitySearchBundle\DependencyInjection\Compiler\FacetCompilerPass;
  14. use StingerSoft\EntitySearchBundle\Services\Facet\FacetServiceInterface;
  15. use Symfony\Component\DependencyInjection\ContainerBuilder;
  16. use Symfony\Component\HttpKernel\Bundle\Bundle;
  17. /**
  18.  */
  19. class StingerSoftEntitySearchBundle extends Bundle {
  20.     public static function getRequiredBundles(string $env, array &$requiredBundles = []): array {
  21.         if(isset($requiredBundles['StingerSoftEntitySearchBundle'])) {
  22.             return $requiredBundles;
  23.         }
  24.         $requiredBundles['StingerSoftEntitySearchBundle'] = '\StingerSoft\EntitySearchBundle\StingerSoftEntitySearchBundle';
  25.         $requiredBundles['KnpPaginatorBundle'] = 'Knp\Bundle\PaginatorBundle\KnpPaginatorBundle';
  26.         return $requiredBundles;
  27.     }
  28.     public function build(ContainerBuilder $container): void {
  29.         $container->registerForAutoconfiguration(FacetServiceInterface::class)->addTag(FacetServiceInterface::TAG_NAME);
  30.         $container->addCompilerPass(new FacetCompilerPass());
  31.     }
  32. }