vendor/sulu/sulu/src/Sulu/Bundle/PreviewBundle/SuluPreviewBundle.php line 26

Open in your IDE?
  1. <?php
  2. /*
  3. * This file is part of Sulu.
  4. *
  5. * (c) Sulu GmbH
  6. *
  7. * This source file is subject to the MIT license that is bundled
  8. * with this source code in the file LICENSE.
  9. */
  10. namespace Sulu\Bundle\PreviewBundle;
  11. use Sulu\Bundle\PersistenceBundle\PersistenceBundleTrait;
  12. use Sulu\Bundle\PreviewBundle\Domain\Model\PreviewLinkInterface;
  13. use Sulu\Bundle\PreviewBundle\Infrastructure\Symfony\DependencyInjection\SuluPreviewExtension;
  14. use Symfony\Component\DependencyInjection\ContainerBuilder;
  15. use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
  16. use Symfony\Component\HttpKernel\Bundle\Bundle;
  17. /**
  18. * Integrates preview into symfony.
  19. *
  20. * @final
  21. */
  22. class SuluPreviewBundle extends Bundle
  23. {
  24. use PersistenceBundleTrait;
  25. /**
  26. * @internal
  27. */
  28. public function build(ContainerBuilder $container): void
  29. {
  30. parent::build($container);
  31. $this->buildPersistence(
  32. [
  33. PreviewLinkInterface::class => 'sulu.model.preview_link.class',
  34. ],
  35. $container
  36. );
  37. }
  38. public function getContainerExtension(): ExtensionInterface
  39. {
  40. return new SuluPreviewExtension();
  41. }
  42. }