protected function performInsert(Request $request) { $entity = new EdkRoute(); $action = new InsertAction($this->crudInfo, $entity, EdkRouteForm::class, ['mode' => EdkRouteForm::ADD, 'areaRepository' => $this->findAreaRepository()]); $action->slug($this->getSlug()); $action->set('isArea', $this->isArea()); return $action->run($this, $request); }
/** * @Route("/insert", name="project_course_insert") */ public function insertAction(Request $request) { $entity = new Course(); $entity->setProject($this->getActiveProject()); $action = new InsertAction($this->crudInfo, $entity, CourseForm::class); $action->slug($this->getSlug()); return $action->run($this, $request); }
/** * @Route("/insert", name="admin_language_insert") */ public function insertAction(Request $request) { $action = new InsertAction($this->crudInfo, new Language(), AdminLanguageForm::class); return $action->run($this, $request); }
/** * @Route("/insert", name="project_milestone_status_rule_insert") */ public function insertAction(Request $request) { $statusRepo = $this->get(self::STATUS_REPO); $milestoneRepo = $this->get(self::MILESTONE_REPO); $statusRepo->setProject($this->getActiveProject()); $milestoneRepo->setProject($this->getActiveProject()); $entity = new MilestoneStatusRule(); $entity->setProject($this->getActiveProject()); $action = new InsertAction($this->crudInfo, $entity, MilestoneStatusRuleForm::class, ['statusRepository' => $statusRepo, 'milestoneRepository' => $milestoneRepo]); $action->slug($this->getSlug()); return $action->run($this, $request); }
/** * @Route("/insert", name="admin_project_insert") */ public function insertAction(Request $request) { $action = new InsertAction($this->crudInfo, new Project(), AdminProjectForm::class, ['projectRepo' => $this->get('cantiga.core.repo.archived_project')]); return $action->run($this, $request); }
/** * @Route("/insert", name="area_edk_participant_insert") */ public function insertAction(Request $request) { try { $area = $this->getMembership()->getItem(); $project = $area->getProject(); $settingsRepository = $this->get('wio.edk.repo.registration'); $settingsRepository->setRootEntity($area); $entity = EdkParticipant::newParticipant(); if ($request->getMethod() == 'POST') { $entity->setRegistrationSettings($settingsRepository->getItem($request->get('route', null))); $entity->setIpAddress(ip2long($_SERVER['REMOTE_ADDR'])); } $action = new InsertAction($this->crudInfo, $entity); $action->slug($this->getSlug()); $action->form(function ($controller, $item, $formType, $action) use($request, $project, $settingsRepository) { $form = new EdkParticipantForm(EdkParticipantForm::ADD, null, $settingsRepository); $form->setText(1, $this->getTextRepository()->getText(EdkTexts::REGISTRATION_TERMS1_TEXT, $request, $project)); $form->setText(2, $this->getTextRepository()->getText(EdkTexts::REGISTRATION_TERMS2_TEXT, $request, $project)); $form->setText(3, $this->getTextRepository()->getText(EdkTexts::REGISTRATION_TERMS3_TEXT, $request, $project)); return $controller->createForm($form, $item, array('action' => $action)); }); $action->set('ajaxRoutePage', 'area_edk_participant_ajax_routes'); return $action->run($this, $request); } catch (ItemNotFoundException $exception) { return $this->showPageWithError($this->trans($exception->getMessage(), [], 'edk'), 'area_edk_participant_index', ['slug' => $this->getSlug()]); } }
/** * @Route("/insert", name="admin_app_text_insert") */ public function insertAction(Request $request) { $action = new InsertAction($this->crudInfo, new AppText(), AppTextForm::class); return $action->run($this, $request); }
/** * @Route("/insert", name="project_links_insert") */ public function insertAction(Request $request) { $entity = new Link(); $entity->setProject($this->getActiveProject()); $action = new InsertAction($this->crudInfo, $entity, LinkForm::class, ['type' => LinkForm::PROJECT_SPECIFIC]); $action->slug($this->getSlug()); return $action->run($this, $request); }
/** * @Route("/insert", name="project_area_insert") */ public function insertAction(Request $request) { $territoryRepo = $this->get('cantiga.core.repo.project_territory'); $statusRepo = $this->get('cantiga.core.repo.project_area_status'); $groupRepo = $this->get('cantiga.core.repo.project_group'); $territoryRepo->setProject($this->getActiveProject()); $statusRepo->setProject($this->getActiveProject()); $groupRepo->setProject($this->getActiveProject()); $formModel = $this->extensionPointFromSettings(CoreExtensions::AREA_FORM, CoreSettings::AREA_FORM); $item = new Area(); $item->setReporter($this->getUser()); $item->setProject($this->getActiveProject()); $action = new InsertAction($this->crudInfo, $item, ProjectAreaForm::class, ['customFormModel' => $formModel, 'territoryRepository' => $territoryRepo, 'groupRepository' => $groupRepo, 'statusRepository' => $statusRepo]); $action->slug($this->getSlug()); $action->customForm($formModel); return $action->run($this, $request); }
/** * @Route("/insert", name="project_area_group_insert") */ public function insertAction(Request $request) { $item = new Group(); $item->setProject($this->getActiveProject()); $action = new InsertAction($this->crudInfo, $item, ProjectGroupForm::class, ['categoryRepository' => $this->getCategoryRepo()]); $action->slug($this->getSlug()); return $action->run($this, $request); }
/** * @Route("/insert", name="admin_links_insert") */ public function insertAction(Request $request) { $entity = new Link(); $action = new InsertAction($this->crudInfo, $entity, LinkForm::class, ['type' => LinkForm::GENERAL]); return $action->run($this, $request); }
/** * @Route("/insert", name="project_milestone_insert") */ public function insertAction(Request $request) { $entity = new Milestone(); $entity->setProject($this->getActiveProject()); $action = new InsertAction($this->crudInfo, $entity, MilestoneForm::class, ['isNew' => true]); $action->slug($this->getSlug()); return $action->run($this, $request); }
/** * @Route("/insert", name="admin_export_insert") */ public function insertAction(Request $request) { $action = new InsertAction($this->crudInfo, new DataExport(), new DataExportForm($this->get('cantiga.core.repo.project'), $this->get('cantiga.core.repo.project_area_status'))); return $action->run($this, $request); }