namespace Rapsys\AirBundle\Repository;
+use Rapsys\AirBundle\Repository;
+
/**
* SnippetRepository
*/
-class SnippetRepository extends \Doctrine\ORM\EntityRepository {
+class SnippetRepository extends Repository {
/**
* Find snippets by user id, locale and index by location id
*
*/
public function findByUserIdLocaleIndexByLocationId(int $userId, string $locale): array {
//Fetch snippets
- $ret = $this->_em
- ->createQuery('SELECT s FROM RapsysAirBundle:Snippet s INDEX BY s.location WHERE s.locale = :locale and s.user = :user')
+ $ret = $this->manager
+ ->createQuery('SELECT s FROM Rapsys\AirBundle\Entity\Snippet s INDEX BY s.location WHERE s.locale = :locale and s.user = :user')
->setParameter('user', $userId)
->setParameter('locale', $locale)
->getResult();