/** * @Route("/index", name="project_app_text_index") */ public function indexAction(Request $request) { $repository = $this->get(self::REPOSITORY_NAME); $repository->setProject($this->getActiveProject()); $dataTable = $repository->createDataTable(); return $this->render($this->crudInfo->getTemplateLocation() . 'index.html.twig', array('pageTitle' => $this->crudInfo->getPageTitle(), 'pageSubtitle' => $this->crudInfo->getPageSubtitle(), 'dataTable' => $dataTable, 'locale' => $request->getLocale(), 'insertPage' => $this->crudInfo->getInsertPage(), 'ajaxListPage' => 'project_app_text_ajax_list')); }
/** * @Route("/insert-cont/{projectId}", name="user_area_request_insert_cont") */ public function insertContAction($projectId, Request $request) { try { $repository = $this->get(self::REPOSITORY_NAME); $settings = $this->getProjectSettings(); $project = $repository->getAvailableProject($projectId); $settings->setProject($project); $formModel = $this->getExtensionPoints()->getImplementation(CoreExtensions::AREA_REQUEST_FORM, $project->createExtensionPointFilter()->fromSettings($settings, CoreSettings::AREA_REQUEST_FORM)); $item = new AreaRequest(); $item->setProject($project); $this->territoryRepository->setProject($project); $form = $this->createForm(UserAreaRequestForm::class, $item, ['action' => $this->generateUrl('user_area_request_insert_cont', ['projectId' => $projectId]), 'customFormModel' => $formModel, 'projectSettings' => $settings, 'territoryRepository' => $this->territoryRepository]); $form->handleRequest($request); if ($form->isValid()) { $id = $repository->insert($item); return $this->showPageWithMessage($this->trans('The area request has been created.'), 'user_area_request_info', ['id' => $id]); } $text = $this->getTextRepository()->getText(CoreTexts::AREA_REQUEST_CREATION_STEP2_TEXT, $request, $project); $projectSpecificText = $settings->get(CoreSettings::AREA_REQUEST_INFO_TEXT)->getValue(); $this->breadcrumbs()->entryLink($this->trans('Request a new area', [], 'pages'), $this->crudInfo->getInsertPage()); return $this->render($this->crudInfo->getTemplateLocation() . 'insert-step2.html.twig', array('text' => $text, 'projectSpecificText' => $projectSpecificText, 'form' => $form->createView(), 'formRenderer' => $formModel->createFormRenderer(), 'project' => $project)); } catch (ModelException $ex) { return $this->showPageWithError($this->trans($ex->getMessage()), $this->crudInfo->getIndexPage()); } }
/** * @Route("/index", name="project_course_index") */ public function indexAction(Request $request) { $dataTable = $this->crudInfo->getRepository()->createDataTable(); return $this->render($this->crudInfo->getTemplateLocation() . 'index.html.twig', array('pageTitle' => $this->crudInfo->getPageTitle(), 'pageSubtitle' => $this->crudInfo->getPageSubtitle(), 'dataTable' => $dataTable, 'locale' => $request->getLocale(), 'insertPage' => $this->crudInfo->getInsertPage(), 'ajaxListPage' => 'project_course_ajax_list')); }
/** * @Route("/index", name="area_edk_participant_index") */ public function indexAction(Request $request) { $text = $this->getTextRepository()->getTextOrFalse(EdkTexts::PARTICIPANT_TEXT, $request, $this->getActiveProject()); $dataTable = $this->crudInfo->getRepository()->createDataTable(); return $this->render($this->crudInfo->getTemplateLocation() . 'index.html.twig', array('pageTitle' => $this->crudInfo->getPageTitle(), 'pageSubtitle' => $this->crudInfo->getPageSubtitle(), 'dataTable' => $dataTable, 'locale' => $request->getLocale(), 'insertPage' => $this->crudInfo->getInsertPage(), 'ajaxListPage' => 'area_edk_participant_ajax_list', 'exportCsvPage' => 'area_edk_participant_export_all', 'text' => $text)); }