| Conditions | 3 |
| Paths | 3 |
| Total Lines | 21 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 4 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 25 | public function load(ObjectManager $manager) |
||
| 26 | { |
||
| 27 | $site = $manager->find('SWP\Bundle\ContentBundle\Document\Site', '/swp/default'); |
||
| 28 | |||
| 29 | if (!$site) { |
||
| 30 | throw new \Exception('Could not find /swp/default document!'); |
||
| 31 | } |
||
| 32 | |||
| 33 | $page = $manager->find('SWP\Bundle\ContentBundle\Document\Route', '/swp/default/routes/homepage'); |
||
| 34 | $site->setHomepage($page); |
||
| 35 | |||
| 36 | $site = $manager->find('SWP\Bundle\ContentBundle\Document\Site', '/swp/client1'); |
||
| 37 | |||
| 38 | if (!$site) { |
||
| 39 | throw new \Exception('Could not find /swp/client1 document!'); |
||
| 40 | } |
||
| 41 | |||
| 42 | $page2 = $manager->find('SWP\Bundle\ContentBundle\Document\Route', '/swp/client1/routes/homepage'); |
||
| 43 | $site->setHomepage($page2); |
||
| 44 | $manager->flush(); |
||
| 45 | } |
||
| 46 | } |
||
| 47 |