public function indexAction($page, $sort, $direction)
    {
        $acl = $this->get('bacon_acl.service.authorization');

        if (!$acl->authorize('module', 'INDEX')) {
            throw $this->createAccessDeniedException();
        }

        $breadcumbs = $this->container->get('bacon_breadcrumbs');

        $breadcumbs->addItem([
            'title' => 'Module',
            'route' => '',
        ]);

        $breadcumbs->addItem([
            'title' => 'List',
            'route' => '',
        ]);

        $entity = new Module();

        if ($this->get('session')->has('module_search_session')) {
            $objSerialize = $this->get('session')->get('module_search_session');
            $entity = unserialize($objSerialize);
        }

        $query = $this->getDoctrine()->getRepository('BaconAclBundle:Module')->getQueryPagination($entity, $sort, $direction);

        $paginator = $this->getPagination($query, $page, Module::PER_PAGE);
        $paginator->setUsedRoute('module_pagination');

        $form = $this->createForm(ModuleFormType::class, $entity, [
            'search' => true,
        ]);

        return [
            'pagination'  => $paginator,
            'form_search' => $form->createView(),
            'form_delete' => $this->createDeleteForm()->createView(),
        ];
    }