]> Raphaƫl G. Git Repositories - treebundle/blobdiff - Repository.php
Version 0.0.8
[treebundle] / Repository.php
index b60959fd108e2d3a5ecf2e9def3079b76b85d546..2198636aa11b097e30877c1c16dd931750e33a47 100644 (file)
@@ -17,6 +17,7 @@ use Doctrine\ORM\Mapping\ClassMetadata;
 
 use Psr\Container\ContainerInterface;
 
+use Rapsys\PackBundle\Util\FileUtil;
 use Rapsys\PackBundle\Util\SluggerUtil;
 
 use Symfony\Component\Routing\RouterInterface;
@@ -48,13 +49,14 @@ class Repository extends EntityRepository {
         * @param EntityManagerInterface $manager The EntityManagerInterface instance
         * @param ClassMetadata $class The ClassMetadata instance
         * @param ContainerInterface $container The container instance
+        * @param FileUtil $file The FileUtil instance
         * @param RouterInterface $router The router instance
         * @param SluggerUtil $slugger The SluggerUtil instance
         * @param TranslatorInterface $translator The TranslatorInterface instance
         * @param string $locale The current locale
         * @param array $languages The languages list
         */
-       public function __construct(protected EntityManagerInterface $manager, protected ClassMetadata $class, protected ContainerInterface $container, protected RouterInterface $router, protected SluggerUtil $slugger, protected TranslatorInterface $translator, protected string $locale, protected array $languages) {
+       public function __construct(protected EntityManagerInterface $manager, protected ClassMetadata $class, protected ContainerInterface $container, protected FileUtil $file, protected RouterInterface $router, protected SluggerUtil $slugger, protected TranslatorInterface $translator, protected string $locale, protected array $languages) {
                //Call parent constructor
                parent::__construct($this->manager, $this->class);
 
@@ -69,8 +71,8 @@ class Repository extends EntityRepository {
                $tables = [
                        'Rapsys\TreeBundle\Entity\UserGroup' => $qs->getJoinTableName($manager->getClassMetadata('Rapsys\TreeBundle\Entity\User')->getAssociationMapping('groups'), $manager->getClassMetadata('Rapsys\TreeBundle\Entity\User'), $dp),
                        'Rapsys\TreeBundle\Entity\Album' => $qs->getTableName($manager->getClassMetadata('Rapsys\TreeBundle\Entity\Album'), $dp),
-                       'Rapsys\TreeBundle\Entity\Asset' => $qs->getTableName($manager->getClassMetadata('Rapsys\TreeBundle\Entity\Asset'), $dp),
                        'Rapsys\TreeBundle\Entity\Civility' => $qs->getTableName($manager->getClassMetadata('Rapsys\TreeBundle\Entity\Civility'), $dp),
+                       'Rapsys\TreeBundle\Entity\Element' => $qs->getTableName($manager->getClassMetadata('Rapsys\TreeBundle\Entity\Element'), $dp),
                        'Rapsys\TreeBundle\Entity\Group' => $qs->getTableName($manager->getClassMetadata('Rapsys\TreeBundle\Entity\Group'), $dp),
                        'Rapsys\TreeBundle\Entity\User' => $qs->getTableName($manager->getClassMetadata('Rapsys\TreeBundle\Entity\User'), $dp),
                        //Set locale