Copied!

ProductPriceUpdateStruct

ProductPriceUpdateStruct.php : 17
Extends ValueObject

The base class for all value objects and structs.

Supports readonly properties by marking them as protected. In this case they will only be writable using constructor, and need to be documented using property-read <$var> annotation in class doc in addition to inline property doc. Writable properties must be public and must be documented inline.

Methods

public__construct()

ProductPriceUpdateStruct.php : 27

Construct object optionally with a set of properties.

public __construct(PriceInterface $price[, Money|null $money = null ][, Money|null $customPriceMoney = null ][, string|null $customPriceRule = null ])

Readonly properties values must be set using $properties as they are not writable anymore after object has been created.

Parameters

Name Type Default value Description
$price PriceInterface - -
$money Money|null null -
$customPriceMoney Money|null null -
$customPriceRule string|null null -

publicexecute()

ProductPriceUpdateStruct.php : 74
public execute(ProductPriceServiceInterface $productPriceService) : void

Parameters

Name Type Default value Description
$productPriceService ProductPriceServiceInterface - -

publicgetCustomPriceMoney()

ProductPriceUpdateStruct.php : 64
public getCustomPriceMoney() : Money|null

Return values

Money|null

publicgetCustomPriceRule()

ProductPriceUpdateStruct.php : 69
public getCustomPriceRule() : string|null

Return values

string|null

publicgetId()

ProductPriceUpdateStruct.php : 49
public getId() : int

Return values

int

Tags
Deprecated

since 4.2. Use getPrice()->getId() instead.

publicgetMoney()

ProductPriceUpdateStruct.php : 59
public getMoney() : Money|null

Return values

Money|null

publicgetPrice()

ProductPriceUpdateStruct.php : 41
public getPrice() : PriceInterface

Return values

PriceInterface

publicgetProduct()

ProductPriceUpdateStruct.php : 79
public getProduct() : ProductInterface

Return values

ProductInterface

protectedgetProperties()

ValueObject.php : 50

Function where list of properties are returned.

protected getProperties([array<string|int, mixed> $dynamicProperties = [] ]) : array<string|int, mixed>

Used by attributes(), override to add dynamic properties

Parameters

Name Type Default value Description
$dynamicProperties array<string|int, mixed> []

Additional dynamic properties exposed on the object

Return values

array<string|int, mixed>