class ContentDimensionsController extends ActionController (View source)

REST service controller for managing content dimensions

Traits

A trait to add backend translation based on the backend users settings

Properties

protected Service $_localizationService from  BackendUserTranslationTrait
protected UserService $_userService from  BackendUserTranslationTrait
protected array $viewFormatToObjectNameMap
protected array $supportedMediaTypes
protected ContentDimensionPresetSourceInterface $contentDimensionPresetSource

Methods

void
initializeObject()

Set the locale according to the user settings

void
indexAction()

Returns the full content dimensions presets as JSON object; see ContentDimensionPresetSourceInterface::getAllPresets() for a format description.

void
showAction(string $dimensionName, array $chosenDimensionPresets = [])

Returns only presets of the dimension specified by $dimensionName. But even though only one dimension is returned, the output follows the structure as described in ContentDimensionPresetSourceInterface::getAllPresets().

Details

protected void initializeObject()

Set the locale according to the user settings

Return Value

void

void indexAction()

Returns the full content dimensions presets as JSON object; see ContentDimensionPresetSourceInterface::getAllPresets() for a format description.

Return Value

void

void showAction(string $dimensionName, array $chosenDimensionPresets = [])

Returns only presets of the dimension specified by $dimensionName. But even though only one dimension is returned, the output follows the structure as described in ContentDimensionPresetSourceInterface::getAllPresets().

It is possible to pass a selection of presets as a filter. In that case, $chosenDimensionPresets must be an array of one or more dimension names (key) and preset names (value). The returned list will then only contain dimension presets which are allowed in combination with the given presets.

Example: Given that $chosenDimensionPresets = array('country' => 'US') and that a second dimension "language" exists and $dimensionName is "language. This method will now display a list of dimension presets for the dimension "language" which are allowed in combination with the country "US".

Parameters

string $dimensionName

Name of the dimension to return presets for

array $chosenDimensionPresets

An optional array of dimension names and a single preset per dimension

Return Value

void