Beispiel #1
0
 /**
  * @Route("/")
  *
  * @return Response
  */
 public function indexAction()
 {
     //$content = str_replace("\\n", "\\\\n", json_encode($this->service->getAllContent()));
     /*$content =  json_encode([[
           'id' => '1',
           'description' => '2',
           'text' => '3' 
       ]]);*/
     // the URI being requested (e.g. /about) minus any query parameters
     $category = $this->category_service->getCategoryList();
     $content = $this->content_service->getAllContent(0);
     $keyWords = $this->content_service->getTextById(IndexController::KEYWORDS_CONTENT_ID);
     $description = $this->content_service->getTextById(IndexController::DESCRIPTION_CONTENT_ID);
     $response = implode('', [$this->_initDocType(), $this->_initHead($keyWords, $description), $this->_initBody($category, $content)]);
     return new Response($response);
 }
Beispiel #2
0
 /**
  * @Route("/delete-category/{categoryId}")
  * @Method({"GET"})
  * 
  * @return int parentId
  */
 public function deleteCategory($categoryId)
 {
     return $this->category_service->delete($categoryId);
 }
Beispiel #3
0
 /**
  * @Route("/get_CategoryList")
  *
  * @Method({"GET"})
  */
 public function categoryListAction(Request $request)
 {
     $result = $this->service->getCategoryList();
     return $result;
 }