# UserQueryController

Extends \NPS\Controller\AbstractController

Controller for user query related functions

author | Lukas Korinek
package | Default

### Methods

## __construct

    __construct(\Symfony\Component\HttpFoundation\RequestStack $stack)

inherited

### Arguments

#### $stack

`\Symfony\Component\HttpFoundation\RequestStack`

## Flushes any doctrine related changes

    flush()

inherited

## Returns current request

    getRequest() : \Symfony\Component\HttpFoundation\Request

inherited

### Response

`\Symfony\Component\HttpFoundation\Request`

## Lists asked contact form user questions

    listQuestionsAction(\NPS\Repository\UserQueryRepository $repo, \Symfony\Component\HttpFoundation\Request $request)

Route | ("/user-query/list-questions")
Security | ("is_granted('ROLE_ADMIN')")

### Arguments

#### $repo

`\NPS\Repository\UserQueryRepository`

#### $request

`\Symfony\Component\HttpFoundation\Request`

## Lists reported errors

    listReportedErrorsAction(\NPS\Repository\UserQueryRepository $repo, \Symfony\Component\HttpFoundation\Request $request)

Route | ("/user-query/list-reports")
Security | ("is_granted('ROLE_ADMIN')")

### Arguments

#### $repo

`\NPS\Repository\UserQueryRepository`

#### $request

`\Symfony\Component\HttpFoundation\Request`

## Creates a contact form question query

    questionAction(\NPS\Factory\UserQueryFactory $factory, \Symfony\Component\HttpFoundation\Request $request, \NPS\DependencyInjection\Mailer $mailer)

Route | ("/user-query/question", methods={"POST"})

### Arguments

#### $factory

`\NPS\Factory\UserQueryFactory`

#### $request

`\Symfony\Component\HttpFoundation\Request`

#### $mailer

`\NPS\DependencyInjection\Mailer`

## Creates an error reporting query

    reportErrorAction(\NPS\Factory\UserQueryFactory $factory, \NPS\Factory\FileFactory $fileFactory, \NPS\Repository\FileRepository $fileRepo, \Symfony\Component\HttpFoundation\Request $request, \NPS\DependencyInjection\Mailer $mailer)

Route | ("/user-query/report", methods={"POST"})

### Arguments

#### $factory

`\NPS\Factory\UserQueryFactory`

#### $fileFactory

`\NPS\Factory\FileFactory`

#### $fileRepo

`\NPS\Repository\FileRepository`

#### $request

`\Symfony\Component\HttpFoundation\Request`

#### $mailer

`\NPS\DependencyInjection\Mailer`

## Creates a response

    response(array $data = array()) : \Symfony\Component\HttpFoundation\Response

inherited

### Arguments

#### $data

`array`

### Response

`\Symfony\Component\HttpFoundation\Response`

### Properties

## Current request

    request : \Symfony\Component\HttpFoundation\Request

inherited

var | Current request

### Type(s)

`\Symfony\Component\HttpFoundation\Request`