class SetDimensions extends AbstractTransformation (View source)

Set dimensions on a node. This always overwrites existing dimensions, if you need to add to existing dimensions, AddDimensions

Properties

protected ContentDimensionRepository $contentDimensionRepository
protected array $dimensionValues

If you omit a configured dimension this transformation will set the default value for that dimension.

protected bool $addDefaultDimensionValues

Sets the default dimension values for all dimensions that were not given.

Methods

bool
isTransformable(NodeData $node)

Returns true, indicating that the given node can be transformed by this transformation.

execute(NodeData $node)

Change the property on the given node.

setDimensionValues(array $dimensionValues)

No description

setAddDefaultDimensionValues(bool $addDefaultDimensionValues)

No description

Details

bool isTransformable(NodeData $node)

Returns true, indicating that the given node can be transformed by this transformation.

Parameters

NodeData $node

Return Value

bool

NodeData execute(NodeData $node)

Change the property on the given node.

Parameters

NodeData $node

Return Value

NodeData

setDimensionValues(array $dimensionValues)

No description

Parameters

array $dimensionValues

setAddDefaultDimensionValues(bool $addDefaultDimensionValues)

No description

Parameters

bool $addDefaultDimensionValues