class AddDimensions extends AbstractTransformation (View source)

Add dimensions on a node. This adds to the existing dimensions, if you need to overwrite existing dimensions, SetDimensions

Properties

protected ContentDimensionRepository $contentDimensionRepository
protected array $dimensionValues

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

protected bool $addDefaultDimensionValues

Adds 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)

Add dimensions to the 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)

Add dimensions to the node.

Parameters

NodeData $node

Return Value

NodeData

setDimensionValues(array $dimensionValues)

No description

Parameters

array $dimensionValues

setAddDefaultDimensionValues(bool $addDefaultDimensionValues)

No description

Parameters

bool $addDefaultDimensionValues