@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. |
20 | 20 | Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. |
21 | 21 | </p>'; |
22 | - }elseif($step_number == 2){ |
|
22 | + } elseif($step_number == 2){ |
|
23 | 23 | $html .='<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, |
24 | 24 | sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, |
25 | 25 | quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. |
33 | 33 | Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. |
34 | 34 | </p>'; |
35 | - }elseif($step_number == 3){ |
|
35 | + } elseif($step_number == 3){ |
|
36 | 36 | $html .='<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, |
37 | 37 | sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, |
38 | 38 | quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. |
52 | 52 | Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. |
53 | 53 | </p>'; |
54 | - }else{ |
|
54 | + } else{ |
|
55 | 55 | $html .='<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, |
56 | 56 | sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, |
57 | 57 | quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. |
@@ -86,8 +86,7 @@ |
||
86 | 86 | $this->session->getStorage()->user = $this->adminUserService->loginUser($email, $password); |
87 | 87 | |
88 | 88 | return $this->response->withStatus(302)->withHeader('Location', $this->router->generateUri('admin')); |
89 | - } |
|
90 | - catch(\Exception $e) { |
|
89 | + } catch(\Exception $e) { |
|
91 | 90 | return $this->login($e->getMessage()); |
92 | 91 | |
93 | 92 | //@todo set $e->getMessage() to flash messanger and print messages in next page |
@@ -85,17 +85,14 @@ discard block |
||
85 | 85 | |
86 | 86 | if($id){ |
87 | 87 | $this->categoryService->updateCategory($data, $id); |
88 | - } |
|
89 | - else{ |
|
88 | + } else{ |
|
90 | 89 | $this->categoryService->createCategory($data); |
91 | 90 | } |
92 | 91 | |
93 | 92 | return $this->response->withStatus(302)->withHeader('Location', $this->router->generateUri('admin.categories')); |
94 | - } |
|
95 | - catch(FilterException $fe){ |
|
93 | + } catch(FilterException $fe){ |
|
96 | 94 | return $this->edit($fe->getArrayMessages()); |
97 | - } |
|
98 | - catch(\Exception $e){ |
|
95 | + } catch(\Exception $e){ |
|
99 | 96 | throw $e; |
100 | 97 | } |
101 | 98 | } |
@@ -107,8 +104,7 @@ discard block |
||
107 | 104 | $this->categoryService->delete($id); |
108 | 105 | |
109 | 106 | return $this->response->withStatus(302)->withHeader('Location', $this->router->generateUri('admin.categories')); |
110 | - } |
|
111 | - catch(\Exception $e){ |
|
107 | + } catch(\Exception $e){ |
|
112 | 108 | return $this->response->withStatus(302)->withHeader('Location', $this->router->generateUri('admin.categories')); |
113 | 109 | } |
114 | 110 | } |
@@ -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 | } |
@@ -90,11 +90,9 @@ discard block |
||
90 | 90 | } else { |
91 | 91 | $this->discussionService->createArticle($user, $data); |
92 | 92 | } |
93 | - } |
|
94 | - catch(FilterException $fe) { |
|
93 | + } catch(FilterException $fe) { |
|
95 | 94 | return $this->edit($fe->getArrayMessages()); |
96 | - } |
|
97 | - catch(\Exception $e) { |
|
95 | + } catch(\Exception $e) { |
|
98 | 96 | throw $e; |
99 | 97 | } |
100 | 98 | |
@@ -105,8 +103,7 @@ discard block |
||
105 | 103 | { |
106 | 104 | try { |
107 | 105 | $this->discussionService->deleteArticle($this->request->getAttribute('id')); |
108 | - } |
|
109 | - catch(\Exception $e) { |
|
106 | + } catch(\Exception $e) { |
|
110 | 107 | throw $e; |
111 | 108 | } |
112 | 109 |
@@ -112,15 +112,12 @@ discard block |
||
112 | 112 | |
113 | 113 | if($id){ |
114 | 114 | $this->postService->updateArticle($data, $id); |
115 | - } |
|
116 | - else{ |
|
115 | + } else{ |
|
117 | 116 | $this->postService->createArticle($user, $data); |
118 | 117 | } |
119 | - } |
|
120 | - catch(FilterException $fe){ |
|
118 | + } catch(FilterException $fe){ |
|
121 | 119 | return $this->edit($fe->getArrayMessages()); |
122 | - } |
|
123 | - catch(\Exception $e){ |
|
120 | + } catch(\Exception $e){ |
|
124 | 121 | throw $e; |
125 | 122 | } |
126 | 123 | |
@@ -137,8 +134,7 @@ discard block |
||
137 | 134 | { |
138 | 135 | try{ |
139 | 136 | $this->postService->deleteArticle($this->request->getAttribute('id')); |
140 | - } |
|
141 | - catch(\Exception $e){ |
|
137 | + } catch(\Exception $e){ |
|
142 | 138 | throw $e; |
143 | 139 | } |
144 | 140 |
@@ -117,11 +117,9 @@ discard block |
||
117 | 117 | } else { |
118 | 118 | $this->videoService->createArticle($user, $data); |
119 | 119 | } |
120 | - } |
|
121 | - catch(FilterException $fe) { |
|
120 | + } catch(FilterException $fe) { |
|
122 | 121 | return $this->edit($fe->getArrayMessages()); |
123 | - } |
|
124 | - catch(\Exception $e) { |
|
122 | + } catch(\Exception $e) { |
|
125 | 123 | throw $e; |
126 | 124 | } |
127 | 125 | |
@@ -138,8 +136,7 @@ discard block |
||
138 | 136 | { |
139 | 137 | try { |
140 | 138 | $this->videoService->deleteArticle($this->request->getAttribute('id')); |
141 | - } |
|
142 | - catch(\Exception $e) { |
|
139 | + } catch(\Exception $e) { |
|
143 | 140 | throw $e; |
144 | 141 | } |
145 | 142 |
@@ -72,11 +72,9 @@ discard block |
||
72 | 72 | } else { |
73 | 73 | $this->eventService->createArticle($user, $data); |
74 | 74 | } |
75 | - } |
|
76 | - catch(FilterException $fe) { |
|
75 | + } catch(FilterException $fe) { |
|
77 | 76 | return $this->edit($fe->getArrayMessages()); |
78 | - } |
|
79 | - catch(\Exception $e) { |
|
77 | + } catch(\Exception $e) { |
|
80 | 78 | throw $e; |
81 | 79 | } |
82 | 80 | |
@@ -87,8 +85,7 @@ discard block |
||
87 | 85 | { |
88 | 86 | try { |
89 | 87 | $this->eventService->deleteArticle($this->request->getAttribute('id')); |
90 | - } |
|
91 | - catch(\Exception $e) { |
|
88 | + } catch(\Exception $e) { |
|
92 | 89 | throw $e; |
93 | 90 | } |
94 | 91 |
@@ -121,8 +121,7 @@ |
||
121 | 121 | $orderNo = 1; |
122 | 122 | $this->updateLevel(null, $menuOrder, $orderNo); |
123 | 123 | $this->menuMapper->getAdapter()->getDriver()->getConnection()->commit(); |
124 | - } |
|
125 | - catch(\Exception $e) { |
|
124 | + } catch(\Exception $e) { |
|
126 | 125 | $this->menuMapper->getAdapter()->getDriver()->getConnection()->rollback(); |
127 | 126 | |
128 | 127 | throw $e; |