| Total Complexity | 3 |
| Total Lines | 40 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | class LanguageRepository extends ServiceEntityRepository |
||
| 16 | { |
||
| 17 | public function __construct(ManagerRegistry $registry) |
||
| 18 | { |
||
| 19 | parent::__construct($registry, Language::class); |
||
| 20 | } |
||
| 21 | |||
| 22 | public function getAllAvailable(): QueryBuilder |
||
| 23 | { |
||
| 24 | $qb = $this->createQueryBuilder('l'); |
||
| 25 | $qb |
||
| 26 | ->where( |
||
| 27 | $qb->expr()->eq('l.available', true) |
||
| 28 | ) |
||
| 29 | ->andWhere( |
||
| 30 | $qb->expr()->isNull('l.parent') |
||
| 31 | ) |
||
| 32 | ; |
||
| 33 | |||
| 34 | return $qb; |
||
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Get all the sub languages that are made available by the admin. |
||
| 39 | * |
||
| 40 | * @return Collection|Language[] |
||
| 41 | */ |
||
| 42 | public function findAllSubLanguages() |
||
| 55 | } |
||
| 56 | } |
||
| 57 |