| @@ 32-45 (lines=14) @@ | ||
| 29 | * |
|
| 30 | * @return QueryBuilder Requête DQL |
|
| 31 | */ |
|
| 32 | public function getAllArticles() |
|
| 33 | { |
|
| 34 | $query = $this->createQueryBuilder('a') |
|
| 35 | ->join('a.supplier', 's') |
|
| 36 | ->addSelect('s') |
|
| 37 | ->where('s.active = 1') |
|
| 38 | ->join('a.familyLog', 'fl') |
|
| 39 | ->addSelect('fl') |
|
| 40 | ->join('a.zoneStorages', 'z') |
|
| 41 | ->addSelect('z') |
|
| 42 | ; |
|
| 43 | ||
| 44 | return $query; |
|
| 45 | } |
|
| 46 | ||
| 47 | /** |
|
| 48 | * Affiche les articles actifs. |
|
| @@ 52-66 (lines=15) @@ | ||
| 49 | * |
|
| 50 | * @return QueryBuilder Requête DQL |
|
| 51 | */ |
|
| 52 | public function getArticles() |
|
| 53 | { |
|
| 54 | $query = $this->createQueryBuilder('a') |
|
| 55 | ->join('a.supplier', 's') |
|
| 56 | ->addSelect('s') |
|
| 57 | ->where('s.active = 1') |
|
| 58 | ->join('a.familyLog', 'fl') |
|
| 59 | ->addSelect('fl') |
|
| 60 | ->join('a.zoneStorages', 'z') |
|
| 61 | ->addSelect('z') |
|
| 62 | ->where('a.active = 1') |
|
| 63 | ; |
|
| 64 | ||
| 65 | return $query; |
|
| 66 | } |
|
| 67 | ||
| 68 | /** |
|
| 69 | * Affiche les articles actifs. |
|