use Psr\Container\ContainerInterface;
+use Rapsys\PackBundle\Util\FileUtil;
use Rapsys\PackBundle\Util\SluggerUtil;
use Rapsys\UserBundle\Factory as BaseFactory;
/**
* 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
* @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) {
}
/**
//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);
}
}