Completed
Push — master ( 1063d7...a7489f )
by Laurent
03:16
created

ZoneStorageRepository::getAllItems()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 8
rs 9.4285
cc 1
eloc 5
nc 1
nop 0
1
<?php
2
3
/**
4
 * Entité ZoneStorage.
5
 *
6
 * PHP Version 5
7
 *
8
 * @author    Quétier Laurent <[email protected]>
9
 * @copyright 2014 Dev-Int GLSR
10
 * @license   http://opensource.org/licenses/gpl-license.php GNU Public License
11
 *
12
 * @version GIT: <git_id>
13
 *
14
 * @link https://github.com/Dev-Int/glsr
15
 */
16
namespace AppBundle\Repository\Settings\Diverse;
17
18
use Doctrine\ORM\EntityRepository;
19
20
/**
21
 * ZoneStorageRepository Entité ZoneStorage.
22
 *
23
 * @category Entity
24
 */
25
class ZoneStorageRepository extends EntityRepository
26
{
27
    /**
28
     * Affiche toutes les zones.
29
     *
30
     * @return QueryBuilder Requête DQL
31
     */
32
    public function getAllItems()
33
    {
34
        $query = $this->createQueryBuilder('z')
35
            ->orderBy('z.name', 'ASC')
36
            ->getQuery()->getResult();
37
        
38
        return $query;
39
    }
40
41
    /**
42
     * Affiche les zones actives.
43
     *
44
     * @return QueryBuilder Requête DQL
45
     */
46
    public function getItems()
47
    {
48
        $query = $this->getAllItems();
49
50
        return $query;
51
    }
52
}
53