File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88use Symfony \Component \HttpFoundation \Request ;
99use Symfony \Component \HttpFoundation \Response ;
1010use Symfony \Component \HttpFoundation \JsonResponse ;
11-
11+ use Symfony \ Component \ HttpKernel \ Exception \ NotFoundHttpException ;
1212use Webkul \UVDesk \SupportCenterBundle \Entity \Article as ArticleEntity ;
1313use Webkul \UVDesk \SupportCenterBundle \Entity \ArticleCategory ;
1414use Webkul \UVDesk \SupportCenterBundle \Entity \ArticleRelatedArticle ;
@@ -473,4 +473,13 @@ private function removeArticle($article)
473473 ->getRepository ('UVDeskSupportCenterBundle:Article ' )
474474 ->removeEntryByArticle ($ article ->getId ());
475475 }
476+
477+ /**
478+ * If customer is playing with url and no result is found then what will happen
479+ * @return
480+ */
481+ protected function noResultFound ()
482+ {
483+ throw new NotFoundHttpException ('Not Found! ' );
484+ }
476485}
Original file line number Diff line number Diff line change 66use Symfony \Component \HttpFoundation \Request ;
77use Symfony \Component \HttpFoundation \Response ;
88use Doctrine \Common \Collections \Criteria ;
9-
9+ use Symfony \ Component \ HttpKernel \ Exception \ NotFoundHttpException ;
1010use Webkul \UVDesk \SupportCenterBundle \Entity \SolutionCategory ;
1111use Webkul \UVDesk \SupportCenterBundle \Entity \SolutionCategoryMapping ;
1212use Webkul \UVDesk \SupportCenterBundle \Form \Category as CategoryForm ;
@@ -59,7 +59,7 @@ public function categoryListBySolution(Request $request)
5959 ->getCategoriesCountBySolution ($ request ->attributes ->get ('solution ' )),
6060 ];
6161 return $ this ->render ('@UVDeskSupportCenter/Staff/Category/categoryListBySolution.html.twig ' ,$ solution_category );
62- }else
62+ } else
6363 $ this ->noResultFound ();
6464 }
6565
@@ -307,4 +307,13 @@ private function removeCategory($category)
307307 ->getRepository ('UVDeskSupportCenterBundle:SolutionCategory ' )
308308 ->removeEntryByCategory ($ category );
309309 }
310+
311+ /**
312+ * If customer is playing with url and no result is found then what will happen
313+ * @return
314+ */
315+ protected function noResultFound ()
316+ {
317+ throw new NotFoundHttpException ('Not Found! ' );
318+ }
310319}
Original file line number Diff line number Diff line change 66use Symfony \Bundle \FrameworkBundle \Controller \Controller ;
77use Symfony \Component \HttpFoundation \Request ;
88use Symfony \Component \HttpFoundation \Response ;
9+ use Symfony \Component \HttpKernel \Exception \NotFoundHttpException ;
910use Webkul \UVDesk \SupportCenterBundle \Entity \Solutions ;
1011
1112class Folder extends Controller
@@ -131,4 +132,13 @@ public function updateFolder($folderId)
131132 'errors ' => json_encode (!empty ($ errors ) ? $ errors : [])
132133 ]);
133134 }
135+
136+ /**
137+ * If customer is playing with url and no result is found then what will happen
138+ * @return
139+ */
140+ protected function noResultFound ()
141+ {
142+ throw new NotFoundHttpException ('Not Found! ' );
143+ }
134144}
Original file line number Diff line number Diff line change @@ -405,4 +405,13 @@ public function rateArticle($articleId, Request $request)
405405
406406 return new Response (json_encode ($ response ['content ' ]), $ response ['code ' ], ['Content-Type: application/json ' ]);
407407 }
408+
409+ /**
410+ * If customer is playing with url and no result is found then what will happen
411+ * @return
412+ */
413+ protected function noResultFound ()
414+ {
415+ throw new NotFoundHttpException ('Not Found! ' );
416+ }
408417}
You can’t perform that action at this time.
0 commit comments