public function childrensAction($id) {
        $em = $this->getDoctrine()->getManager();

        $parent = $em->getRepository('AmulenClassificationBundle:Category')->findOneBy(array("id" => $id));
        $childrens = $em->getRepository('AmulenClassificationBundle:Category')->getChildren($parent, true);

        return array(
            'entities' => $childrens,
            'parent' => $parent,
        );
    }
public function childrensAction($id) {
        $em = $this->getDoctrine()->getManager();

        $parent = $em->getRepository('AmulenClassificationBundle:Category')->findOneBy(array("id" => $id));
        $childrens = $em->getRepository('AmulenClassificationBundle:Category')->getChildren($parent, true);

        return array(
            'entities' => $childrens,
            'parent' => $parent,
        );
    }
public function childrensAction ( $ id ) { $ em = $ this -> getDoctrine ( ) -> getManager ( ) ; $ parent = $ em -> getRepository ( 'AmulenClassificationBundle:Category' ) -> findOneBy ( array ( "id" => $ id ) ) ; $ childrens = $ em -> getRepository ( 'AmulenClassificationBundle:Category' ) -> getChildren ( $ parent , true ) ; return array ( 'entities' => $ childrens , 'parent' => $ parent , ) ; }
Select parent.

@Route("/childrens/{id}", name="admin_news_category_children")
@Method("GET")
@Template()
Select parent .