Copied!

ProductCreateStruct

ProductCreateStruct.php : 17
Extends ValueObject

The base class for all value objects and structs.

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

Methods

public__construct()

ProductCreateStruct.php : 28

Construct object optionally with a set of properties.

public __construct(ProductTypeInterface $productType, ContentCreateStruct $contentCreateStruct[, string|null $code = null ])

Readonly properties values must be set using $properties as they aren't writable anymore after object has been created.

Parameters

Name Type Default value Description
$productType ProductTypeInterface - -
$contentCreateStruct ContentCreateStruct - -
$code string|null null -

publicgetAttributes()

ProductCreateStruct.php : 52
public getAttributes() : array<string, mixed>

Return values

array<string, mixed>

publicgetCode()

ProductCreateStruct.php : 39
public getCode() : string|null

Return values

string|null

publicgetContentCreateStruct()

ProductCreateStruct.php : 85
public getContentCreateStruct() : ContentCreateStruct

Return values

ContentCreateStruct

publicgetProductType()

ProductCreateStruct.php : 90
public getProductType() : ProductTypeInterface

Return values

ProductTypeInterface

publicsetAttribute()

ProductCreateStruct.php : 60
public setAttribute(string $name, mixed $value) : void

Parameters

Name Type Default value Description
$name string - -
$value mixed - -

publicsetAttributes()

ProductCreateStruct.php : 68
public setAttributes(array<string, mixed> $attributes) : void

Parameters

Name Type Default value Description
$attributes array<string, mixed> - -

publicsetCode()

ProductCreateStruct.php : 44
public setCode(string|null $code) : void

Parameters

Name Type Default value Description
$code string|null - -

publicsetField()

ProductCreateStruct.php : 76
public setField(string $fieldDefIdentifier, mixed $value[, string|null $language = null ]) : void

Parameters

Name Type Default value Description
$fieldDefIdentifier string - -
$value mixed - -
$language string|null null -

protectedgetProperties()

ValueObject.php : 54

Returns list of available properties' names.

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

Override to add dynamic properties.

Parameters

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

Additional dynamic properties exposed on the object

Return values

array<int, string>

Tags
Serializerignore

()