Open dinel opened 6 years ago
in src/AppBundle/Controller/DefaultController.php, line 53
The parameter value, which is an object, should be typehinted.
value
*/ public function getSubcategory(Request $request, $parent) { if($request->isXmlHttpRequest()) { $repository = $this->getDoctrine()->getRepository("\AppBundle\Entity\Category"); $categories = $repository->findBy(array('parent' => $parent)); $a_categories = array_map(function($value) { return array($value->getId(), $value->getName()); }, $categories); return new JsonResponse(array( 'sub_categories' => $a_categories,
Posted from SensioLabsInsight
in src/AppBundle/Controller/DefaultController.php, line 53
Posted from SensioLabsInsight