| Conditions | 2 |
| Paths | 2 |
| Total Lines | 20 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 33 | public function get($id) |
||
| 34 | { |
||
| 35 | try { |
||
| 36 | $Layout = $this->createQueryBuilder('l') |
||
| 37 | ->select('l, bp, b') |
||
| 38 | ->leftJoin('l.BlockPositions', 'bp') |
||
| 39 | ->leftJoin('bp.Block', 'b') |
||
| 40 | ->where('l.id = :id') |
||
| 41 | ->orderBy('bp.block_row', 'ASC') |
||
| 42 | ->setParameter('id', $id) |
||
| 43 | ->getQuery() |
||
| 44 | ->useResultCache(true, $this->getCacheLifetime()) |
||
| 45 | ->getSingleResult(); |
||
| 46 | |||
| 47 | } catch (NoResultException $e) { |
||
| 48 | return null; |
||
| 49 | } |
||
| 50 | |||
| 51 | return $Layout; |
||
| 52 | } |
||
| 53 | } |
||
| 54 |