Conditions | 2 |
Paths | 2 |
Total Lines | 18 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php |
||
33 | public function get($layout_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 = :layout_id') |
||
41 | ->orderBy('bp.block_row', 'ASC') |
||
42 | ->setParameter('layout_id', $layout_id) |
||
43 | ->getQuery() |
||
44 | ->getSingleResult(); |
||
45 | } catch (NoResultException $e) { |
||
46 | return null; |
||
47 | } |
||
48 | |||
49 | return $Layout; |
||
50 | } |
||
51 | } |
||
52 |