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

Inheritance: extends eZ\Publish\Core\MVC\Symfony\Controller\Controller
Datei anzeigen Open project: ezsystems/ezpublish-kernel

Public Methods

Method Description
__construct ( eZ\Publish\API\Repository\ContentService $contentService, Symfony\Component\Routing\RouterInterface $router, RouteReferenceGenerator $routeReferenceGenerator )
redirectToContentDownloadAction ( mixed $contentId, integer $fieldId, Request $request ) : RedirectResponse Used by the REST API to reference downloadable files.

Protected Methods

Method Description
findFieldInContent ( integer $fieldId, eZ\Publish\API\Repository\Values\Content\Content $content ) : eZ\Publish\API\Repository\Values\Content\Field Finds the field with id $fieldId in $content.

Method Details

__construct() public method

public __construct ( eZ\Publish\API\Repository\ContentService $contentService, Symfony\Component\Routing\RouterInterface $router, RouteReferenceGenerator $routeReferenceGenerator )
$contentService eZ\Publish\API\Repository\ContentService
$router Symfony\Component\Routing\RouterInterface
$routeReferenceGenerator eZ\Publish\Core\MVC\Symfony\Routing\Generator\RouteReferenceGenerator

findFieldInContent() protected method

Finds the field with id $fieldId in $content.
protected findFieldInContent ( integer $fieldId, eZ\Publish\API\Repository\Values\Content\Content $content ) : eZ\Publish\API\Repository\Values\Content\Field
$fieldId integer
$content eZ\Publish\API\Repository\Values\Content\Content
return eZ\Publish\API\Repository\Values\Content\Field

redirectToContentDownloadAction() public method

It redirects (permanently) to the standard ez_content_download route, based on the language of the field passed as an argument, using the language switcher.
public redirectToContentDownloadAction ( mixed $contentId, integer $fieldId, Request $request ) : RedirectResponse
$contentId mixed
$fieldId integer
$request Symfony\Component\HttpFoundation\Request
return Symfony\Component\HttpFoundation\RedirectResponse