Completed
Push — sf2.7 ( 18de34...b252b6 )
by Laurent
18:26
created

SubFamilyLogRepository::getFromFamilyLog()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 10
rs 9.4285
cc 1
eloc 6
nc 1
nop 1
1
<?php
2
3
/**
4
 * Entité SubFamilyLog.
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    0.1.0
13
 *
14
 * @link       https://github.com/Dev-Int/glsr
15
 */
16
namespace AppBundle\Entity;
17
18
use Doctrine\ORM\EntityRepository;
19
20
/**
21
 * SubFamilyLogRepository Entité SubFamilyLog.
22
 *
23
 * @category   Entity
24
 */
25
class SubFamilyLogRepository extends EntityRepository
26
{
27
    /**
28
     * Renvoie la liste des sous-famille logistique attachées
29
     * à la famille logistique passée en paramètre.
30
     *
31
     * @param int $idFamLog id de la famille logistique
32
     *
33
     * @return array query result
34
     */
35
    public function getFromFamilyLog($idFamLog)
36
    {
37
        $query = $this->_em->createQuery(
38
            'SELECT sf FROM AppBundle:subFamilyLog sf '
39
            .'WHERE sf.familylogs = :id'
40
        );
41
        $query->setParameter('id', $idFamLog);
42
43
        return $query->getResult();
44
    }
45
}
46