@@ -29,16 +29,16 @@ |
||
29 | 29 | |
30 | 30 | public function getHeaderMenu() |
31 | 31 | { |
32 | - return $this->menuService->getNestedAll(true, ['is_in_header' => true]); |
|
32 | + return $this->menuService->getNestedAll(true, [ 'is_in_header' => true ]); |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | public function getFooterMenu() |
36 | 36 | { |
37 | - return $this->menuService->getNestedAll(true, ['is_in_footer' => true]); |
|
37 | + return $this->menuService->getNestedAll(true, [ 'is_in_footer' => true ]); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | public function getSideMenu() |
41 | 41 | { |
42 | - return $this->menuService->getNestedAll(true, ['is_in_side' => true]); |
|
42 | + return $this->menuService->getNestedAll(true, [ 'is_in_side' => true ]); |
|
43 | 43 | } |
44 | 44 | } |
45 | 45 | \ No newline at end of file |
@@ -37,13 +37,13 @@ discard block |
||
37 | 37 | ])); |
38 | 38 | } |
39 | 39 | |
40 | - public function edit($errors = []) |
|
40 | + public function edit($errors = [ ]) |
|
41 | 41 | { |
42 | 42 | $id = $this->request->getAttribute('id'); |
43 | 43 | $item = $this->menuService->get($id); |
44 | 44 | |
45 | - if($this->request->getParsedBody()){ |
|
46 | - $item = (object)($this->request->getParsedBody() + (array)$item); |
|
45 | + if ($this->request->getParsedBody()) { |
|
46 | + $item = (object) ($this->request->getParsedBody() + (array) $item); |
|
47 | 47 | $item->menu_id = $id; |
48 | 48 | } |
49 | 49 | |
@@ -58,36 +58,36 @@ discard block |
||
58 | 58 | |
59 | 59 | public function save() |
60 | 60 | { |
61 | - try{ |
|
61 | + try { |
|
62 | 62 | $id = $this->request->getAttribute('id'); |
63 | 63 | $data = $this->request->getParsedBody(); |
64 | 64 | |
65 | - if($id){ |
|
65 | + if ($id) { |
|
66 | 66 | $this->menuService->updateMenuItem($data, $id); |
67 | 67 | } |
68 | - else{ |
|
68 | + else { |
|
69 | 69 | $this->menuService->addMenuItem($data); |
70 | 70 | } |
71 | 71 | |
72 | 72 | return $this->response->withStatus(302)->withHeader('Location', $this->router->generateUri('admin.menu')); |
73 | 73 | } |
74 | - catch(FilterException $fe){ |
|
74 | + catch (FilterException $fe) { |
|
75 | 75 | return $this->edit($fe->getArrayMessages()); |
76 | 76 | } |
77 | - catch(\Exception $e){ |
|
77 | + catch (\Exception $e) { |
|
78 | 78 | throw $e; |
79 | 79 | } |
80 | 80 | } |
81 | 81 | |
82 | 82 | public function delete() |
83 | 83 | { |
84 | - try{ |
|
84 | + try { |
|
85 | 85 | $id = $this->request->getAttribute('id'); |
86 | 86 | $this->menuService->delete($id); |
87 | 87 | |
88 | 88 | return $this->response->withStatus(302)->withHeader('Location', $this->router->generateUri('admin.menu')); |
89 | 89 | } |
90 | - catch(\Exception $e){ |
|
90 | + catch (\Exception $e) { |
|
91 | 91 | throw $e; |
92 | 92 | } |
93 | 93 | } |
@@ -95,9 +95,9 @@ discard block |
||
95 | 95 | public function updateOrder() |
96 | 96 | { |
97 | 97 | $data = $this->request->getParsedBody(); |
98 | - $menuOrder = isset($data['order']) ? json_decode($data['order']) : []; |
|
98 | + $menuOrder = isset($data[ 'order' ]) ? json_decode($data[ 'order' ]) : [ ]; |
|
99 | 99 | $status = $this->menuService->updateMenuOrder($menuOrder); |
100 | 100 | |
101 | - return new JsonResponse(['status' => $status]); |
|
101 | + return new JsonResponse([ 'status' => $status ]); |
|
102 | 102 | } |
103 | 103 | } |
104 | 104 | \ No newline at end of file |
@@ -64,17 +64,14 @@ discard block |
||
64 | 64 | |
65 | 65 | if($id){ |
66 | 66 | $this->menuService->updateMenuItem($data, $id); |
67 | - } |
|
68 | - else{ |
|
67 | + } else{ |
|
69 | 68 | $this->menuService->addMenuItem($data); |
70 | 69 | } |
71 | 70 | |
72 | 71 | return $this->response->withStatus(302)->withHeader('Location', $this->router->generateUri('admin.menu')); |
73 | - } |
|
74 | - catch(FilterException $fe){ |
|
72 | + } catch(FilterException $fe){ |
|
75 | 73 | return $this->edit($fe->getArrayMessages()); |
76 | - } |
|
77 | - catch(\Exception $e){ |
|
74 | + } catch(\Exception $e){ |
|
78 | 75 | throw $e; |
79 | 76 | } |
80 | 77 | } |
@@ -86,8 +83,7 @@ discard block |
||
86 | 83 | $this->menuService->delete($id); |
87 | 84 | |
88 | 85 | return $this->response->withStatus(302)->withHeader('Location', $this->router->generateUri('admin.menu')); |
89 | - } |
|
90 | - catch(\Exception $e){ |
|
86 | + } catch(\Exception $e){ |
|
91 | 87 | throw $e; |
92 | 88 | } |
93 | 89 | } |
@@ -20,65 +20,65 @@ |
||
20 | 20 | |
21 | 21 | public function getInputFilter() |
22 | 22 | { |
23 | - if(!$this->inputFilter){ |
|
23 | + if (!$this->inputFilter) { |
|
24 | 24 | $inputFilter = new InputFilter(); |
25 | 25 | |
26 | 26 | $inputFilter->add([ |
27 | 27 | 'name' => 'title', |
28 | 28 | 'required' => true, |
29 | - 'filters' => [['name' => 'StripTags'], ['name' => 'StringTrim']], |
|
29 | + 'filters' => [ [ 'name' => 'StripTags' ], [ 'name' => 'StringTrim' ] ], |
|
30 | 30 | 'validators' => [ |
31 | - ['name' => 'NotEmpty'], |
|
32 | - ['name' => 'StringLength', 'options' => ['max' => '255']], |
|
31 | + [ 'name' => 'NotEmpty' ], |
|
32 | + [ 'name' => 'StringLength', 'options' => [ 'max' => '255' ] ], |
|
33 | 33 | ], |
34 | 34 | ]); |
35 | 35 | |
36 | 36 | $inputFilter->add([ |
37 | 37 | 'name' => 'href', |
38 | 38 | 'required' => false, |
39 | - 'filters' => [['name' => 'StripTags'], ['name' => 'StringTrim']] |
|
39 | + 'filters' => [ [ 'name' => 'StripTags' ], [ 'name' => 'StringTrim' ] ] |
|
40 | 40 | ]); |
41 | 41 | |
42 | 42 | $inputFilter->add([ |
43 | 43 | 'name' => 'article_id', |
44 | 44 | 'required' => false, |
45 | - 'filters' => [['name' => 'Null']], |
|
45 | + 'filters' => [ [ 'name' => 'Null' ] ], |
|
46 | 46 | 'validators' => [ |
47 | - ['name' => RecordExists::class, 'options' => ['table' => 'articles', 'field' => 'article_id', 'adapter' => $this->db]] |
|
47 | + [ 'name' => RecordExists::class, 'options' => [ 'table' => 'articles', 'field' => 'article_id', 'adapter' => $this->db ] ] |
|
48 | 48 | ] |
49 | 49 | ]); |
50 | 50 | |
51 | 51 | $inputFilter->add([ |
52 | 52 | 'name' => 'category_id', |
53 | 53 | 'required' => false, |
54 | - 'filters' => [['name' => 'Null']], |
|
54 | + 'filters' => [ [ 'name' => 'Null' ] ], |
|
55 | 55 | 'validators' => [ |
56 | - ['name' => RecordExists::class, 'options' => ['table' => 'category', 'field' => 'category_id', 'adapter' => $this->db]] |
|
56 | + [ 'name' => RecordExists::class, 'options' => [ 'table' => 'category', 'field' => 'category_id', 'adapter' => $this->db ] ] |
|
57 | 57 | ] |
58 | 58 | ]); |
59 | 59 | |
60 | 60 | $inputFilter->add([ |
61 | 61 | 'name' => 'is_active', |
62 | 62 | 'required' => false, |
63 | - 'filters' => [['name' => 'Boolean']] |
|
63 | + 'filters' => [ [ 'name' => 'Boolean' ] ] |
|
64 | 64 | ]); |
65 | 65 | |
66 | 66 | $inputFilter->add([ |
67 | 67 | 'name' => 'is_in_header', |
68 | 68 | 'required' => false, |
69 | - 'filters' => [['name' => 'Boolean']] |
|
69 | + 'filters' => [ [ 'name' => 'Boolean' ] ] |
|
70 | 70 | ]); |
71 | 71 | |
72 | 72 | $inputFilter->add([ |
73 | 73 | 'name' => 'is_in_footer', |
74 | 74 | 'required' => false, |
75 | - 'filters' => [['name' => 'Boolean']] |
|
75 | + 'filters' => [ [ 'name' => 'Boolean' ] ] |
|
76 | 76 | ]); |
77 | 77 | |
78 | 78 | $inputFilter->add([ |
79 | 79 | 'name' => 'is_in_side', |
80 | 80 | 'required' => false, |
81 | - 'filters' => [['name' => 'Boolean']] |
|
81 | + 'filters' => [ [ 'name' => 'Boolean' ] ] |
|
82 | 82 | ]); |
83 | 83 | |
84 | 84 | $this->inputFilter = $inputFilter; |
@@ -15,24 +15,24 @@ discard block |
||
15 | 15 | $this->adapter = $adapter; |
16 | 16 | } |
17 | 17 | |
18 | - public function selectAll($isActive = null, $filter = []) |
|
18 | + public function selectAll($isActive = null, $filter = [ ]) |
|
19 | 19 | { |
20 | 20 | $select = $this->getSql()->select() |
21 | - ->join('category', 'menu.category_uuid = category.category_uuid', ['category_name' => 'name', 'category_slug' => 'slug'], 'left') |
|
22 | - ->join('articles', 'articles.article_uuid = menu.article_uuid', ['article_id', 'article_slug' => 'slug'], 'left') |
|
23 | - ->order(['order_no' => 'asc']); |
|
21 | + ->join('category', 'menu.category_uuid = category.category_uuid', [ 'category_name' => 'name', 'category_slug' => 'slug' ], 'left') |
|
22 | + ->join('articles', 'articles.article_uuid = menu.article_uuid', [ 'article_id', 'article_slug' => 'slug' ], 'left') |
|
23 | + ->order([ 'order_no' => 'asc' ]); |
|
24 | 24 | |
25 | - if($isActive !== null) { |
|
26 | - $select->where(['is_active' => $isActive]); |
|
25 | + if ($isActive !== null) { |
|
26 | + $select->where([ 'is_active' => $isActive ]); |
|
27 | 27 | } |
28 | 28 | |
29 | - if($filter) { |
|
30 | - if(isset($filter['is_in_header'])) { |
|
31 | - $select->where(['is_in_header' => $filter['is_in_header']]); |
|
32 | - } elseif(isset($filter['is_in_footer'])) { |
|
33 | - $select->where(['is_in_footer' => $filter['is_in_footer']]); |
|
34 | - } elseif(isset($filter['is_in_side'])) { |
|
35 | - $select->where(['is_in_side' => $filter['is_in_side']]); |
|
29 | + if ($filter) { |
|
30 | + if (isset($filter[ 'is_in_header' ])) { |
|
31 | + $select->where([ 'is_in_header' => $filter[ 'is_in_header' ] ]); |
|
32 | + } elseif (isset($filter[ 'is_in_footer' ])) { |
|
33 | + $select->where([ 'is_in_footer' => $filter[ 'is_in_footer' ] ]); |
|
34 | + } elseif (isset($filter[ 'is_in_side' ])) { |
|
35 | + $select->where([ 'is_in_side' => $filter[ 'is_in_side' ] ]); |
|
36 | 36 | } |
37 | 37 | } |
38 | 38 | |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | |
49 | 49 | public function updateMenuItem($data, $id) |
50 | 50 | { |
51 | - $this->update($data, ['menu_id' => $id]); |
|
51 | + $this->update($data, [ 'menu_id' => $id ]); |
|
52 | 52 | |
53 | 53 | return $id; |
54 | 54 | } |
@@ -56,9 +56,9 @@ discard block |
||
56 | 56 | public function get($id) |
57 | 57 | { |
58 | 58 | $select = $this->getSql()->select() |
59 | - ->join('articles', 'articles.article_uuid = menu.article_uuid', ['article_id'], 'left') |
|
60 | - ->join('category', 'category.category_uuid = menu.category_uuid', ['category_id'], 'left') |
|
61 | - ->where(['menu_id' => $id]); |
|
59 | + ->join('articles', 'articles.article_uuid = menu.article_uuid', [ 'article_id' ], 'left') |
|
60 | + ->join('category', 'category.category_uuid = menu.category_uuid', [ 'category_id' ], 'left') |
|
61 | + ->where([ 'menu_id' => $id ]); |
|
62 | 62 | |
63 | 63 | return $this->selectWith($select)->current(); |
64 | 64 | } |
@@ -66,8 +66,8 @@ discard block |
||
66 | 66 | public function forSelect() |
67 | 67 | { |
68 | 68 | $select = $this->getSql()->select() |
69 | - ->columns(['menu_id', 'title', 'is_active']) |
|
70 | - ->order(['is_active' => 'desc']); |
|
69 | + ->columns([ 'menu_id', 'title', 'is_active' ]) |
|
70 | + ->order([ 'is_active' => 'desc' ]); |
|
71 | 71 | |
72 | 72 | return $this->selectWith($select); |
73 | 73 | } |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | 'partial/menu-level' => __DIR__ . '/../templates/partial/menu-level.phtml', |
13 | 13 | ], |
14 | 14 | 'paths' => [ |
15 | - 'menu' => [__DIR__ . '/../templates/menu'], |
|
15 | + 'menu' => [ __DIR__ . '/../templates/menu' ], |
|
16 | 16 | ], |
17 | 17 | ], |
18 | 18 | |
@@ -33,13 +33,13 @@ discard block |
||
33 | 33 | 'name' => 'admin.menu', |
34 | 34 | 'path' => '/admin/menu', |
35 | 35 | 'middleware' => Controller\IndexController::class, |
36 | - 'allowed_methods' => ['GET'], |
|
36 | + 'allowed_methods' => [ 'GET' ], |
|
37 | 37 | ], |
38 | 38 | [ |
39 | 39 | 'name' => 'admin.menu.action', |
40 | 40 | 'path' => '/admin/menu/:action/:id', |
41 | 41 | 'middleware' => Controller\IndexController::class, |
42 | - 'allowed_methods' => ['GET', 'POST'], |
|
42 | + 'allowed_methods' => [ 'GET', 'POST' ], |
|
43 | 43 | ], |
44 | 44 | ], |
45 | 45 |
@@ -11,8 +11,8 @@ |
||
11 | 11 | { |
12 | 12 | public function __invoke(ContainerInterface $container) |
13 | 13 | { |
14 | - $config = $container->get('config')['upload']; |
|
15 | - $upload = new Upload($config['public_path'], $config['non_public_path']); |
|
14 | + $config = $container->get('config')[ 'upload' ]; |
|
15 | + $upload = new Upload($config[ 'public_path' ], $config[ 'non_public_path' ]); |
|
16 | 16 | |
17 | 17 | return new PageService( |
18 | 18 | $container->get(PageMapper::class), |
@@ -39,8 +39,8 @@ discard block |
||
39 | 39 | public function index(): HtmlResponse |
40 | 40 | { |
41 | 41 | $params = $this->request->getQueryParams(); |
42 | - $page = isset($params['page']) ? $params['page'] : 1; |
|
43 | - $limit = isset($params['limit']) ? $params['limit'] : 15; |
|
42 | + $page = isset($params[ 'page' ]) ? $params[ 'page' ] : 1; |
|
43 | + $limit = isset($params[ 'limit' ]) ? $params[ 'limit' ] : 15; |
|
44 | 44 | $pagination = $this->pageService->getPagination($page, $limit); |
45 | 45 | |
46 | 46 | return new HtmlResponse($this->template->render('page::index', [ |
@@ -49,14 +49,14 @@ discard block |
||
49 | 49 | ])); |
50 | 50 | } |
51 | 51 | |
52 | - public function edit($errors = []): HtmlResponse |
|
52 | + public function edit($errors = [ ]): HtmlResponse |
|
53 | 53 | { |
54 | 54 | $id = $this->request->getAttribute('id'); |
55 | 55 | $page = $this->pageService->getPage($id); |
56 | 56 | |
57 | - if($this->request->getParsedBody()) { |
|
57 | + if ($this->request->getParsedBody()) { |
|
58 | 58 | $page = new \Page\Entity\Page(); |
59 | - $page->exchangeArray($this->request->getParsedBody() + (array)$page); |
|
59 | + $page->exchangeArray($this->request->getParsedBody() + (array) $page); |
|
60 | 60 | } |
61 | 61 | |
62 | 62 | return new HtmlResponse($this->template->render('page::edit', [ |
@@ -71,9 +71,9 @@ discard block |
||
71 | 71 | try { |
72 | 72 | $pageId = $this->request->getAttribute('id'); |
73 | 73 | $data = $this->request->getParsedBody(); |
74 | - $data += (new Request())->getFiles()->toArray(); |
|
74 | + $data += (new Request())->getFiles()->toArray(); |
|
75 | 75 | |
76 | - if($pageId) { |
|
76 | + if ($pageId) { |
|
77 | 77 | $this->pageService->updatePage($data, $pageId); |
78 | 78 | } |
79 | 79 | else { |
@@ -82,10 +82,10 @@ discard block |
||
82 | 82 | |
83 | 83 | return $this->response->withStatus(302)->withHeader('Location', $this->router->generateUri('admin.pages')); |
84 | 84 | } |
85 | - catch(FilterException $fe) { |
|
85 | + catch (FilterException $fe) { |
|
86 | 86 | return $this->edit($fe->getArrayMessages()); |
87 | 87 | } |
88 | - catch(\Exception $e) { |
|
88 | + catch (\Exception $e) { |
|
89 | 89 | throw $e; |
90 | 90 | } |
91 | 91 | } |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | |
99 | 99 | return $this->response->withStatus(302)->withHeader('Location', $this->router->generateUri('admin.pages')); |
100 | 100 | } |
101 | - catch(\Exception $e) { |
|
101 | + catch (\Exception $e) { |
|
102 | 102 | return $this->response->withStatus(302)->withHeader('Location', $this->router->generateUri('admin.pages')); |
103 | 103 | } |
104 | 104 | } |
@@ -75,17 +75,14 @@ discard block |
||
75 | 75 | |
76 | 76 | if($pageId) { |
77 | 77 | $this->pageService->updatePage($data, $pageId); |
78 | - } |
|
79 | - else { |
|
78 | + } else { |
|
80 | 79 | $this->pageService->createPage($data); |
81 | 80 | } |
82 | 81 | |
83 | 82 | return $this->response->withStatus(302)->withHeader('Location', $this->router->generateUri('admin.pages')); |
84 | - } |
|
85 | - catch(FilterException $fe) { |
|
83 | + } catch(FilterException $fe) { |
|
86 | 84 | return $this->edit($fe->getArrayMessages()); |
87 | - } |
|
88 | - catch(\Exception $e) { |
|
85 | + } catch(\Exception $e) { |
|
89 | 86 | throw $e; |
90 | 87 | } |
91 | 88 | } |
@@ -97,8 +94,7 @@ discard block |
||
97 | 94 | $this->pageService->delete($pageId); |
98 | 95 | |
99 | 96 | return $this->response->withStatus(302)->withHeader('Location', $this->router->generateUri('admin.pages')); |
100 | - } |
|
101 | - catch(\Exception $e) { |
|
97 | + } catch(\Exception $e) { |
|
102 | 98 | return $this->response->withStatus(302)->withHeader('Location', $this->router->generateUri('admin.pages')); |
103 | 99 | } |
104 | 100 | } |
@@ -17,65 +17,65 @@ |
||
17 | 17 | $inputFilter->add([ |
18 | 18 | 'name' => 'title', |
19 | 19 | 'required' => true, |
20 | - 'filters' => [['name' => 'StringTrim']], |
|
20 | + 'filters' => [ [ 'name' => 'StringTrim' ] ], |
|
21 | 21 | 'validators' => [ |
22 | - ['name' => 'NotEmpty'], |
|
23 | - ['name' => 'StringLength', 'options' => ['min' => 2, 'max' => 100]], |
|
22 | + [ 'name' => 'NotEmpty' ], |
|
23 | + [ 'name' => 'StringLength', 'options' => [ 'min' => 2, 'max' => 100 ] ], |
|
24 | 24 | ], |
25 | 25 | ]); |
26 | 26 | |
27 | 27 | $inputFilter->add([ |
28 | 28 | 'name' => 'slug', |
29 | 29 | 'required' => true, |
30 | - 'filters' => [['name' => 'StringTrim']], |
|
30 | + 'filters' => [ [ 'name' => 'StringTrim' ] ], |
|
31 | 31 | 'validators' => [ |
32 | - ['name' => 'NotEmpty'], |
|
33 | - ['name' => 'StringLength', 'options' => ['min' => 2, 'max' => 100]], |
|
32 | + [ 'name' => 'NotEmpty' ], |
|
33 | + [ 'name' => 'StringLength', 'options' => [ 'min' => 2, 'max' => 100 ] ], |
|
34 | 34 | ], |
35 | 35 | ]); |
36 | 36 | |
37 | 37 | $inputFilter->add([ |
38 | 38 | 'name' => 'body', |
39 | 39 | 'required' => true, |
40 | - 'filters' => [['name' => 'StringTrim']], |
|
40 | + 'filters' => [ [ 'name' => 'StringTrim' ] ], |
|
41 | 41 | 'validators' => [ |
42 | - ['name' => 'NotEmpty'], |
|
43 | - ['name' => 'StringLength', 'options' => ['min' => 2, 'max' => 100000]], |
|
42 | + [ 'name' => 'NotEmpty' ], |
|
43 | + [ 'name' => 'StringLength', 'options' => [ 'min' => 2, 'max' => 100000 ] ], |
|
44 | 44 | ], |
45 | 45 | ]); |
46 | 46 | |
47 | 47 | $inputFilter->add([ |
48 | 48 | 'name' => 'description', |
49 | 49 | 'required' => true, |
50 | - 'filters' => [['name' => 'StringTrim']], |
|
50 | + 'filters' => [ [ 'name' => 'StringTrim' ] ], |
|
51 | 51 | 'validators' => [ |
52 | - ['name' => 'NotEmpty'], |
|
53 | - ['name' => 'StringLength', 'options' => ['min' => 2, 'max' => 50000]], |
|
52 | + [ 'name' => 'NotEmpty' ], |
|
53 | + [ 'name' => 'StringLength', 'options' => [ 'min' => 2, 'max' => 50000 ] ], |
|
54 | 54 | ], |
55 | 55 | ]); |
56 | 56 | |
57 | 57 | $inputFilter->add([ |
58 | 58 | 'name' => 'has_layout', |
59 | 59 | 'required' => false, |
60 | - 'filters' => [['name' => 'Boolean']], |
|
60 | + 'filters' => [ [ 'name' => 'Boolean' ] ], |
|
61 | 61 | ]); |
62 | 62 | |
63 | 63 | $inputFilter->add([ |
64 | 64 | 'name' => 'is_homepage', |
65 | 65 | 'required' => false, |
66 | - 'filters' => [['name' => 'Boolean']], |
|
66 | + 'filters' => [ [ 'name' => 'Boolean' ] ], |
|
67 | 67 | ]); |
68 | 68 | |
69 | 69 | $inputFilter->add([ |
70 | 70 | 'name' => 'is_active', |
71 | 71 | 'required' => false, |
72 | - 'filters' => [['name' => 'Boolean']], |
|
72 | + 'filters' => [ [ 'name' => 'Boolean' ] ], |
|
73 | 73 | ]); |
74 | 74 | |
75 | 75 | $inputFilter->add([ |
76 | 76 | 'name' => 'is_wysiwyg_editor', |
77 | 77 | 'required' => false, |
78 | - 'filters' => [['name' => 'Boolean']], |
|
78 | + 'filters' => [ [ 'name' => 'Boolean' ] ], |
|
79 | 79 | ]); |
80 | 80 | |
81 | 81 | return $inputFilter; |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | 'page/pagination' => __DIR__ . '/../templates/partial/pagination.php', |
15 | 15 | ], |
16 | 16 | 'paths' => [ |
17 | - 'page' => [__DIR__ . '/../templates/page'], |
|
17 | + 'page' => [ __DIR__ . '/../templates/page' ], |
|
18 | 18 | ], |
19 | 19 | ], |
20 | 20 | |
@@ -32,13 +32,13 @@ discard block |
||
32 | 32 | 'name' => 'admin.pages', |
33 | 33 | 'path' => '/admin/pages', |
34 | 34 | 'middleware' => Controller\PageController::class, |
35 | - 'allowed_methods' => ['GET'], |
|
35 | + 'allowed_methods' => [ 'GET' ], |
|
36 | 36 | ], |
37 | 37 | [ |
38 | 38 | 'name' => 'admin.pages.action', |
39 | 39 | 'path' => '/admin/pages/:action/:id', |
40 | 40 | 'middleware' => Controller\PageController::class, |
41 | - 'allowed_methods' => ['GET', 'POST'] |
|
41 | + 'allowed_methods' => [ 'GET', 'POST' ] |
|
42 | 42 | ] |
43 | 43 | ], |
44 | 44 | ]; |