Class

eZ\Publish\Core\MVC\Symfony\Controller\Content\DownloadRedirectionController

class DownloadRedirectionController extends Controller

Methods

mixed getParameter(string $parameterName, mixed $defaultValue = null)

Returns value for $parameterName and fallbacks to $defaultValue if not defined.

from Controller
bool hasParameter(string $parameterName)

Checks if $parameterName is defined.

from Controller
ConfigResolverInterface getConfigResolver()

from Controller
Response render(string $view, array $parameters = array(), Response $response = null)

Renders a view.

from Controller
EngineInterface getTemplateEngine()

from Controller
LoggerInterface|null getLogger()

from Controller
Repository getRepository()

from Controller
Request getRequest()

from Controller
EventDispatcherInterface getEventDispatcher()

from Controller
bool isGranted(Attribute $attribute)

Checks if current user has granted access to provided attribute.

from Controller
__construct(ContentService $contentService, RouterInterface $router, RouteReferenceGenerator $routeReferenceGenerator)

RedirectResponse redirectToContentDownloadAction(mixed $contentId, int $fieldId, Request $request)

Used by the REST API to reference downloadable files.

Details

in Controller at line 28
public mixed getParameter(string $parameterName, mixed $defaultValue = null)

Returns value for $parameterName and fallbacks to $defaultValue if not defined.

Parameters

string $parameterName
mixed $defaultValue

Return Value

mixed

in Controller at line 44
public bool hasParameter(string $parameterName)

Checks if $parameterName is defined.

Parameters

string $parameterName

Return Value

bool

in Controller at line 52
public ConfigResolverInterface getConfigResolver()

in Controller at line 66
public Response render(string $view, array $parameters = array(), Response $response = null)

Renders a view.

Parameters

string $view The view name
array $parameters An array of parameters to pass to the view
Response $response

Return Value

Response

in Controller at line 80
public EngineInterface getTemplateEngine()

Return Value

EngineInterface

in Controller at line 88
public LoggerInterface|null getLogger()

Return Value

LoggerInterface|null

in Controller at line 96
public Repository getRepository()

Return Value

Repository

in Controller at line 104
public Request getRequest()

Return Value

Request

in Controller at line 112
public EventDispatcherInterface getEventDispatcher()

Return Value

EventDispatcherInterface

in Controller at line 124
public bool isGranted(Attribute $attribute)

Checks if current user has granted access to provided attribute.

Parameters

Attribute $attribute

Return Value

bool

at line 29
public __construct(ContentService $contentService, RouterInterface $router, RouteReferenceGenerator $routeReferenceGenerator)

Parameters

ContentService $contentService
RouterInterface $router
RouteReferenceGenerator $routeReferenceGenerator

at line 47
public RedirectResponse redirectToContentDownloadAction(mixed $contentId, int $fieldId, Request $request)

Used by the REST API to reference downloadable files.

It redirects (permanently) to the standard ezcontentdownload route, based on the language of the field passed as an argument, using the language switcher.

Parameters

mixed $contentId
int $fieldId
Request $request

Return Value

RedirectResponse