Copied!

CreateStruct

CreateStruct.php : 11
Extends ValueObject

Base SPI Value object.

All properties of SPI\ValueObject must be serializable for cache & NoSQL use.

Properties

public $alwaysAvailable

CreateStruct.php : 46
public bool $alwaysAvailable = false

Always available flag

public $fields

CreateStruct.php : 43

Contains *all* fields of the object to be created.

public array<string|int, Field$fields = []

This attribute should contain all fields (in all language) of the object to be created. If a field is not translatable, it may only occur once. The storage layer will automatically take care that such fields are assigned to each language version.

public $initialLanguageId

CreateStruct.php : 56

Language id the content was initially created in.

public mixed $initialLanguageId

public $isHidden

CreateStruct.php : 79

Is hidden flag.

public bool $isHidden

public $locations

CreateStruct.php : 31

ContentId, contentVersion and mainLocationId are allowed to be left empty when used on with this struct as these values are created by the create method.

public array<string|int, CreateStruct$locations = []

public $mainLanguageId

CreateStruct.php : 65

Optional, main language of the content, if not set $initialLanguageId will be used instead.

public mixed|null $mainLanguageId

Typical use is copy operations where content main language and version initial language might differ.

public $modified

CreateStruct.php : 72

Modification date.

public int $modified

public $name

CreateStruct.php : 14
public array<string|int, string> $name

Eg. array( 'eng-GB' => "New Article" )

public $ownerId

CreateStruct.php : 23
public int $ownerId

public $remoteId

CreateStruct.php : 49
public string $remoteId

Remote identifier used as a custom identifier for the object

public $sectionId

CreateStruct.php : 20
public int $sectionId

public $typeId

CreateStruct.php : 17
public int $typeId

Methods

public__construct()

ValueObject.php : 30

Construct object optionally with a set of properties.

public __construct([array<string|int, mixed> $properties = [] ])

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
$properties array<string|int, mixed> [] -

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>