Conditions | 2 |
Paths | 2 |
Total Lines | 18 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
26 | public function indexAction() |
||
27 | { |
||
28 | $pathBuilder = $this->get('swp_multi_tenancy.path_builder'); |
||
29 | $manager = $this->get('doctrine_phpcr')->getManager(); |
||
30 | $site = $manager->find('SWP\Bundle\ContentBundle\Document\Site', $pathBuilder->build('/')); |
||
31 | $homepage = $site->getHomepage(); |
||
32 | |||
33 | if (!$homepage) { |
||
34 | throw $this->createNotFoundException('No homepage configured!'); |
||
35 | } |
||
36 | |||
37 | $tenantContext = $this->get('swp_multi_tenancy.tenant_context'); |
||
38 | |||
39 | return $this->render('index.html.twig', [ |
||
40 | 'tenant' => $tenantContext->getTenant(), |
||
41 | 'page' => $homepage, |
||
42 | ]); |
||
43 | } |
||
44 | } |
||
45 |