public function sortAction(Request $request)
    {
        $em = $this->getDoctrine()->getManager();

        if ($request->isXmlHttpRequest()) {
            $this->get('admin_manager')->sort('BlogBundle:Category', $request->get('values'));

            return new Response(0, 200);
        }

        $categories = $em->getRepository('BlogBundle:Category')->findBy(
            array('parentCategory' => NULL),
            array('order' => 'asc')
        );

        return array(
            'categories' => $categories
        );
    }