@param \Symfony\Component\HttpFoundation\Request $request
@param \eZ\Publish\API\Repository\Values\ObjectState\ObjectStateGroup $group

@return \Symfony\Component\HttpFoundation\Response
192889
public function deleteAction(Request $request, ObjectStateGroup $group): Response
    {
        $this->denyAccessUnlessGranted(new Attribute('state', 'administrate'));
        $form = $this->formFactory->deleteObjectStateGroup(
            new ObjectStateGroupDeleteData($group)
        );
        $form->handleRequest($request);

        if ($form->isSubmitted()) {
            $result = $this->submitHandler->handle($form, function (ObjectStateGroupDeleteData $data) {
                $group = $data->getObjectStateGroup();
                $this->objectStateService->deleteObjectStateGroup($group);

                $this->notificationHandler->success(
                    $this->translator->trans(
                        /** @Desc("Object state group '%name%' deleted.") */
                        'object_state_group.delete.success',
                        ['%name%' => $group->getName()],
                        'object_state'
                    )
                );
            });

            if ($result instanceof Response) {
                return $result;
            }
        }

        return $this->redirectToRoute('ezplatform.object_state.groups.list');
    }
69266
public function addGroupAction(Request $request, $groupId)
    {
        $format = $request->get('_format', 'json');
        $facade = $this->get('jms_serializer')->deserialize(
            $request->getContent(),
            $this->getParameter('open_orchestra_user_admin.facade.user_collection.class'),
            $format
        );
        $users = $this->get('open_orchestra_api.transformer_manager')->get('user_collection')->reverseTransform($facade);
        $group =  $this->get('open_orchestra_user.repository.group')->find($groupId);

        $this->get('open_orchestra_user.repository.user')->addGroup($users, $group);

        return array();
    }
688812
public function postAction(Request $request)
    {
        $targetGroup = $this->deserializeData($request->getContent());
        $targetGroup = $this->getTargetGroupRepository()->save($targetGroup);

        $this->getEntityManager()->flush();

        return $this->handleView($this->view($targetGroup));
    }
1321261
public function viewAction(ObjectStateGroup $objectStateGroup): Response
    {
        $deleteForm = $this->formFactory->deleteObjectStateGroup(
            new ObjectStateGroupDeleteData($objectStateGroup)
        )->createView();

        return $this->render('@ezdesign/admin/object_state_group/view.html.twig', [
            'can_administrate' => $this->isGranted(new Attribute('state', 'administrate')),
            'object_state_group' => $objectStateGroup,
            'delete_form' => $deleteForm,
        ]);
    }
1313525
public function removeGroupsAction($id, $class, Request $request)
    {
        $object = $this->find($class, $id);
        $groups = $this->decodeIdsString($request, 'Claroline\CoreBundle\Entity\Group');
        $this->crud->patch($object, 'group', Crud::COLLECTION_REMOVE, $groups);

        return new JsonResponse($this->serializer->serialize($object));
    }
784564
public function update(AttributeGroup $group, Attribute $attribute, FormRequest $request)
    {
        $data = $request->all();
        $data['attribute_group_id'] = $group->id;
        $this->repository->update($data);

        return $this->redirect($request, $attribute);
    }
971719
public function handle($request, Closure $next, $group)
    {
        if ($this->auth->check() && $this->auth->user()->group() == $group) {
            return $next($request);
        }
        throw new GroupDeniedException($group);
    }
814450
public function store(CreatePermissionGroup $request)
    {
        $group = new Permission_group;
		$group->name = $request->name;
		$group->code = $request->code;
		$group->save();
		
		return redirect(url("permission/group"))->with('dp_announce', trans('deeppermission.alert.group.created'));
    }
631758
public function deleteAction(Request $request, ObjectState $objectState): Response
    {
        $this->denyAccessUnlessGranted(new Attribute('state', 'administrate'));
        $form = $this->formFactory->create(
            ObjectStateDeleteType::class,
            new ObjectStateDeleteData($objectState)
        );
        $form->handleRequest($request);

        if ($form->isSubmitted()) {
            $result = $this->submitHandler->handle($form, function (ObjectStateDeleteData $data) {
                $objectState = $data->getObjectState();
                $this->objectStateService->deleteObjectState($objectState);

                $this->notificationHandler->success(
                    $this->translator->trans(
                        /** @Desc("Object state '%name%' deleted.") */
                        'object_state.delete.success',
                        ['%name%' => $objectState->getName()],
                        'object_state'
                    )
                );
            });

            if ($result instanceof Response) {
                return $result;
            }
        }

        return $this->redirectToRoute('ezplatform.object_state.group.view', [
            'objectStateGroupId' => $objectState->getObjectStateGroup()->id,
        ]);
    }
1075751
public function updateAction(Request $request, ObjectState $objectState): Response
    {
        $this->denyAccessUnlessGranted(new Attribute('state', 'administrate'));
        $form = $this->formFactory->create(
            ObjectStateUpdateType::class,
            new ObjectStateUpdateData($objectState)
        );
        $form->handleRequest($request);

        if ($form->isSubmitted()) {
            $result = $this->submitHandler->handle($form, function (ObjectStateUpdateData $data) {
                $objectState = $data->getObjectState();
                $updateStruct = $this->objectStateService->newObjectStateUpdateStruct();
                $updateStruct->identifier = $data->getIdentifier();
                $updateStruct->names[$objectState->mainLanguageCode] = $data->getName();

                $updatedObjectState = $this->objectStateService->updateObjectState($objectState, $updateStruct);

                $this->notificationHandler->success(
                    $this->translator->trans(
                        /** @Desc("Object state '%name%' updated.") */
                        'object_state.update.success',
                        ['%name%' => $updatedObjectState->getName()],
                        'object_state'
                    )
                );

                return $this->redirectToRoute('ezplatform.object_state.state.view', [
                    'objectStateId' => $objectState->id,
                ]);
            });

            if ($result instanceof Response) {
                return $result;
            }
        }

        return $this->render('@ezdesign/admin/object_state/edit.html.twig', [
            'object_state_group' => $objectState->getObjectStateGroup(),
            'object_state' => $objectState,
            'form' => $form->createView(),
        ]);
    }
347744
public function update(CategoryRequest $request, CategoryGroup $categoryGroup, Category $category): JsonResponse
    {
        if ($category->category_group_id !== $categoryGroup->id) {
            abort(404);
        }

        $category->update(
            $request->only('icon')
        );

        foreach ($request->file('icons', []) as $key => $file) {
            if ($categoryGroup->hasFileIcon($key) && $file) {
                $category->icons()->updateOrCreate(
                    ['key' => $key],
                    ['icon' => $file]
                );
            }
        }

        $this->modifySlugs($request);

        $category->updateTranslations(
            $request->input('translations')
        );

        dispatch(
            new RegenerateCategoryFullSlugs($category)
        );

        $this->clearCache();

        return response()->json([
            'state' => 'success',
        ]);
    }
274864
public function updateAction(Request $request, ContentTypeGroup $group): Response
    {
        $this->denyAccessUnlessGranted(new Attribute('class', 'update'));
        $form = $this->formFactory->updateContentTypeGroup(
            new ContentTypeGroupUpdateData($group)
        );
        $form->handleRequest($request);

        if ($form->isSubmitted()) {
            $result = $this->submitHandler->handle($form, function (ContentTypeGroupUpdateData $data) {
                $group = $data->getContentTypeGroup();
                $updateStruct = $this->contentTypeService->newContentTypeGroupUpdateStruct();
                $updateStruct->identifier = $data->getIdentifier();

                $this->contentTypeService->updateContentTypeGroup($group, $updateStruct);

                $this->notificationHandler->success(
                    $this->translator->trans(
                        /** @Desc("Content type group '%name%' updated.") */
                        'content_type_group.update.success',
                        ['%name%' => $group->identifier],
                        'content_type'
                    )
                );

                return new RedirectResponse($this->generateUrl('ezplatform.content_type_group.view', [
                    'contentTypeGroupId' => $group->id,
                ]));
            });

            if ($result instanceof Response) {
                return $result;
            }
        }

        return $this->render('@ezdesign/admin/content_type_group/edit.html.twig', [
            'content_type_group' => $group,
            'form' => $form->createView(),
        ]);
    }
664422
public function viewAction(Request $request, ContentTypeGroup $group, int $page = 1): Response
    {
        return $this->render('@ezdesign/admin/content_type_group/view.html.twig', [
            'content_type_group' => $group,
            'page' => $page,
            'route_name' => $request->get('_route'),
        ]);
    }
310061
public function listInGroupAction(Request $request, $groupId)
    {
        $mapping = array(
            'username' => 'username',
            'email' => 'email'
        );
        $configuration = PaginateFinderConfiguration::generateFromRequest($request, $mapping);
        $repository = $this->get('open_orchestra_user.repository.user');

        $collection = $repository->findUsersByGroupsForPaginate($configuration, $groupId);
        $recordsTotal = $repository->countFilterByGroups($groupId);

        $facade = $this->get('open_orchestra_api.transformer_manager')->transform('user_collection', $collection);
        $facade->recordsTotal = $recordsTotal;
        $facade->recordsFiltered = $recordsTotal;

        return $facade;
    }
346303
public function removeGroupAction(Request $request, $groupId)
    {
        $format = $request->get('_format', 'json');

        $facade = $this->get('jms_serializer')->deserialize(
            $request->getContent(),
            $this->getParameter('open_orchestra_user_admin.facade.user.class'),
            $format
        );
        $user = $this->get('open_orchestra_api.transformer_manager')->reverseTransform('user', $facade);
        if (!$user instanceof UserInterface) {
            throw new UserNotFoundHttpException();
        }
        $this->denyAccessUnlessGranted(ContributionActionInterface::EDIT, $user);

        $this->get('open_orchestra_user.repository.user')->removeGroup($user->getId(), $groupId);

        return array();
    }
1370584
public function bulkDeleteAction(Request $request): Response
    {
        $this->denyAccessUnlessGranted(new Attribute('class', 'delete'));
        $form = $this->formFactory->deleteContentTypeGroups(
            new ContentTypeGroupsDeleteData()
        );
        $form->handleRequest($request);

        if ($form->isSubmitted()) {
            $result = $this->submitHandler->handle($form, function (ContentTypeGroupsDeleteData $data) {
                foreach ($data->getContentTypeGroups() as $contentTypeGroupId => $selected) {
                    $group = $this->contentTypeService->loadContentTypeGroup($contentTypeGroupId);
                    $this->contentTypeService->deleteContentTypeGroup($group);

                    $this->notificationHandler->success(
                        $this->translator->trans(
                            /** @Desc("Content type group '%name%' deleted.") */
                            'content_type_group.delete.success',
                            ['%name%' => $group->identifier],
                            'content_type'
                        )
                    );
                }
            });

            if ($result instanceof Response) {
                return $result;
            }
        }

        return $this->redirect($this->generateUrl('ezplatform.content_type_group.list'));
    }
1096485
public function request(Request $request, array $rules, string $group = null, array $messages = [], $default = null): self
    {
        foreach ($rules as $param => $options) {
            $this->validateInput(
                $this->getRequestParam($request, $param, $default),
                new Configuration($options, $param, $group, $default),
                $messages
            );
        }

        return $this;
    }