X-Git-Url: https://git.rapsys.eu/treebundle/blobdiff_plain/a1cb94127e9710ffc6d46cb63a9e855831ebd465..HEAD:/Factory.php?ds=sidebyside diff --git a/Factory.php b/Factory.php index 1856f3f..865dab0 100644 --- a/Factory.php +++ b/Factory.php @@ -17,6 +17,7 @@ use Doctrine\Persistence\ObjectRepository; use Psr\Container\ContainerInterface; +use Rapsys\PackBundle\Util\FileUtil; use Rapsys\PackBundle\Util\SluggerUtil; use Rapsys\UserBundle\Factory as BaseFactory; @@ -27,11 +28,12 @@ use Symfony\Contracts\Translation\TranslatorInterface; /** * This factory is used to create default repository objects for entities at runtime. */ -final class Factory extends BaseFactory { +class Factory extends BaseFactory { /** * Initializes a new RepositoryFactory instance * * @param ContainerInterface $container The container instance + * @param FileUtil $file The FileUtil instance * @param RequestStack $request The request stack * @param RouterInterface $router The router instance * @param SluggerUtil $slugger The SluggerUtil instance @@ -39,7 +41,7 @@ final class Factory extends BaseFactory { * @param string $locale The current locale * @param array $languages The languages list */ - public function __construct(private ContainerInterface $container, private RequestStack $request, private RouterInterface $router, private SluggerUtil $slugger, private TranslatorInterface $translator, private string $locale, private array $languages) { + public function __construct(protected ContainerInterface $container, protected FileUtil $file, protected RequestStack $request, protected RouterInterface $router, protected SluggerUtil $slugger, protected TranslatorInterface $translator, protected string $locale, protected array $languages) { } /** @@ -61,6 +63,6 @@ final class Factory extends BaseFactory { //Return repository class instance //XXX: router, slugger, translator, languages and locale arguments will be ignored by default - return new $repositoryClass($entityManager, $metadata, $this->container, $this->router, $this->slugger, $this->translator, $this->locale, $this->languages); + return new $repositoryClass($entityManager, $metadata, $this->container, $this->file, $this->router, $this->slugger, $this->translator, $this->locale, $this->languages); } }