Conditions | 2 |
Paths | 2 |
Total Lines | 16 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
25 | 22 | public function load(array $condition = array()) |
|
26 | { |
||
27 | /** @type \blitze\sitemaker\model\entity\menu|null $entity */ |
||
28 | 22 | $entity = parent::load($condition); |
|
29 | |||
30 | if ($entity) |
||
31 | 22 | { |
|
32 | 16 | $items_mapper = $this->mapper_factory->create('items'); |
|
33 | |||
34 | /** @type \blitze\sitemaker\model\collections\items $collection */ |
||
35 | 16 | $collection = $items_mapper->find(array('%smenu_id', '=', $entity->get_menu_id())); |
|
36 | 16 | $entity->set_items($collection); |
|
37 | 16 | } |
|
38 | |||
39 | 22 | return $entity; |
|
40 | } |
||
41 | |||
57 |