-
Notifications
You must be signed in to change notification settings - Fork 0
/
AdditionalPageController.php
executable file
·55 lines (40 loc) · 1.49 KB
/
AdditionalPageController.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
namespace App\Controllers;
use App\Repositories\AdditionalPageRepository;
/* Adam Endvy */
class AdditionalPageController extends \BaseController
{
public function __construct(AdditionalPageRepository $additionalPageRepository)
{
parent::__construct();
$this->additionalPageRepository = $additionalPageRepository;
}
public function about()
{
$page = $this->additionalPageRepository->get('about-us');
return $this->formatRender(nl2br($page->content), $this->setTitle(trans($page->title)));
}
public function developers()
{
return $this->formatRender($this->theme->section('developers.index'), $this->setTitle('Developers'));
}
public function terms()
{
$page = $this->additionalPageRepository->get('terms-and-condition');
return $this->formatRender(nl2br($page->content), $this->setTitle(trans($page->title)));
}
public function disclaimer()
{
$page = $this->additionalPageRepository->get('disclaimer');
return $this->formatRender(nl2br($page->content), $this->setTitle(trans($page->title)));
}
public function privacy()
{
$page = $this->additionalPageRepository->get('privacy-policy');
return $this->formatRender(nl2br($page->content), $this->setTitle(trans($page->title)));
}
public function formatRender($content, $title)
{
return $this->render('additional-pages.layout', ['content' => $content, 'title' => $title]);
}
}