vendor/shopware/core/System/Snippet/Files/SnippetFileCollectionFactory.php line 20

  1. <?php declare(strict_types=1);
  2. namespace Shopware\Core\System\Snippet\Files;
  3. use Shopware\Core\Framework\Log\Package;
  4. #[Package('system-settings')]
  5. class SnippetFileCollectionFactory
  6. {
  7.     /**
  8.      * @internal
  9.      */
  10.     public function __construct(private readonly SnippetFileLoaderInterface $snippetFileLoader)
  11.     {
  12.     }
  13.     public function createSnippetFileCollection(): SnippetFileCollection
  14.     {
  15.         $collection = new SnippetFileCollection();
  16.         $this->snippetFileLoader->loadSnippetFilesIntoCollection($collection);
  17.         return $collection;
  18.     }
  19. }