public function searchAction(Request $request)
    {
        $acl = $this->get('bacon_acl.service.authorization');

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

        $this->get('session')->remove('moduleactions_search_session');

        if ($request->getMethod() === Request::METHOD_POST) {
            $entityName     =   $this->getParameter('bacon_acl.entities.module_actions');
            $formTypeName   =   $this->getParameter('bacon_acl.forms.module_actions_form_type_class');

            $form = $this->createForm($formTypeName, new $entityName(), [
                'search' => true,
            ]);

            $form->handleRequest($request);

            $this->get('session')->set('moduleactions_search_session', serialize($form->getData()));
        }

        return $this->redirect($this->generateUrl('module_actions'));
    }