You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
737 B
34 lines
737 B
|
10 years ago
|
<?php
|
||
|
|
/* For licensing terms, see /license.txt */
|
||
|
|
|
||
|
8 years ago
|
namespace Chamilo\CoreBundle\Repository;
|
||
|
10 years ago
|
|
||
|
|
use Doctrine\ORM\EntityRepository;
|
||
|
|
|
||
|
9 years ago
|
/**
|
||
|
8 years ago
|
* Class LanguageRepository.
|
||
|
|
*
|
||
|
8 years ago
|
* @package Chamilo\CoreBundle\Repository
|
||
|
9 years ago
|
*/
|
||
|
10 years ago
|
class LanguageRepository extends EntityRepository
|
||
|
|
{
|
||
|
|
/**
|
||
|
|
* Get all the sub languages that are made available by the admin.
|
||
|
8 years ago
|
*
|
||
|
10 years ago
|
* @return array
|
||
|
|
*/
|
||
|
|
public function findAllPlatformSubLanguages()
|
||
|
|
{
|
||
|
|
$qb = $this->createQueryBuilder('l');
|
||
|
|
$qb->select('l')
|
||
|
|
->where(
|
||
|
|
$qb->expr()->eq('l.available', true)
|
||
|
|
)
|
||
|
|
->andWhere(
|
||
|
|
$qb->expr()->isNotNull('l.parent')
|
||
|
|
);
|
||
|
|
|
||
|
|
return $qb->getQuery()->getResult();
|
||
|
|
}
|
||
|
|
}
|