These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | use Symfony\Component\HttpFoundation\RedirectResponse; |
||
4 | use Symfony\Component\HttpFoundation\Request; |
||
5 | |||
6 | class PageController extends CRUDController |
||
7 | { |
||
8 | public function showDefaultAction() |
||
9 | { |
||
10 | $page = Page::getHomePage(); |
||
0 ignored issues
–
show
|
|||
11 | |||
12 | if ($page->isValid()) { |
||
13 | return $this->forward("show", array("page" => $page)); |
||
14 | } |
||
15 | |||
16 | return $this->render("Page/default.html.twig"); |
||
17 | } |
||
18 | |||
19 | public function showAction(Page $page) |
||
20 | { |
||
21 | return array("page" => $page); |
||
22 | } |
||
23 | |||
24 | public function createAction(Player $me, Request $request) |
||
25 | { |
||
26 | $this->data->set('name', $request->query->get('name')); |
||
27 | |||
28 | return $this->create($me); |
||
29 | } |
||
30 | |||
31 | public function editAction(Player $me, Page $page) |
||
32 | { |
||
33 | return $this->edit($page, $me, "page"); |
||
34 | } |
||
35 | |||
36 | public function deleteAction(Player $me, Page $page) |
||
37 | { |
||
38 | return $this->delete($page, $me); |
||
39 | } |
||
40 | |||
41 | protected function redirectToList($model) |
||
42 | { |
||
43 | return new RedirectResponse( |
||
44 | Service::getGenerator()->generate("index") |
||
45 | ); |
||
46 | } |
||
47 | } |
||
48 |
This method has been deprecated.