src/Kunstmaan/TranslatorBundle/Repository/TranslationRepository.php
public function findAllNotDisabled($locale, $domain = null)
    {
        $qb = $this->createQueryBuilder('t');
        $qb
            ->select('t')
            ->where('t.locale = :locale')
            ->andWhere('t.status != :statusstring')
            ->setParameter('statusstring', Translation::STATUS_DISABLED)
            ->setParameter('locale', $locale);
        if (!\is_null($domain) && !empty($domain)) {
            $qb->andWhere('t.domain = :tdomain')
                ->setParameter('tdomain', $domain);
        }

        return $qb->getQuery()->getResult();
    }
public function findAllNotDisabled($locale, $domain = null)
    {
        $qb = $this->createQueryBuilder('t');
        $qb
            ->select('t')
            ->where('t.locale = :locale')
            ->andWhere('t.status != :statusstring')
            ->setParameter('statusstring', Translation::STATUS_DISABLED)
            ->setParameter('locale', $locale);
        if (!\is_null($domain) && !empty($domain)) {
            $qb->andWhere('t.domain = :tdomain')
                ->setParameter('tdomain', $domain);
        }

        return $qb->getQuery()->getResult();
    }
public function findAllNotDisabled ( $ locale , $ domain = null ) { $ qb = $ this -> createQueryBuilder ( 't' ) ; $ qb -> select ( 't' ) -> where ( 't.locale = :locale' ) -> andWhere ( 't.status != :statusstring' ) -> setParameter ( 'statusstring' , Translation :: STATUS_DISABLED ) -> setParameter ( 'locale' , $ locale ) ; if ( ! \ is_null ( $ domain ) && ! empty ( $ domain ) ) { $ qb -> andWhere ( 't.domain = :tdomain' ) -> setParameter ( 'tdomain' , $ domain ) ; } return $ qb -> getQuery ( ) -> getResult ( ) ; }
Get an array of all non disabled translations

@param string $locale
@param string $domain

@return array
Get an array of all non disabled translations