src/Phlexible/Bundle/UserBundle/Controller/GroupsController.php
public function deleteAction($groupId)
    {
        $groupManager = $this->get('phlexible_user.group_manager');

        $group = $groupManager->find($groupId);
        $name = $group->getName();

        $groupManager->deleteGroup($group);

        $this->get('phlexible_message.message_poster')
            ->post(UsersMessage::create('Group "'.$group->getName().'" deleted.'));

        return new ResultResponse(true, "Group $name deleted.");
    }
public function deleteAction($groupId)
    {
        $groupManager = $this->get('phlexible_user.group_manager');

        $group = $groupManager->find($groupId);
        $name = $group->getName();

        $groupManager->deleteGroup($group);

        $this->get('phlexible_message.message_poster')
            ->post(UsersMessage::create('Group "'.$group->getName().'" deleted.'));

        return new ResultResponse(true, "Group $name deleted.");
    }
public function deleteAction ( $ groupId ) { $ groupManager = $ this -> get ( 'phlexible_user.group_manager' ) ; $ group = $ groupManager -> find ( $ groupId ) ; $ name = $ group -> getName ( ) ; $ groupManager -> deleteGroup ( $ group ) ; $ this -> get ( 'phlexible_message.message_poster' ) -> post ( UsersMessage :: create ( 'Group "' . $ group -> getName ( ) . '" deleted.' ) ) ; return new ResultResponse ( true , "Group $name deleted." ) ; }
Delete group.

@param string $groupId

@return JsonResponse
@Route("/{groupId}", name="users_groups_delete")
@Method("DELETE")
@ApiDoc(
description="Delete group"
)
Delete group .