commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-history
src
Models
ChangeValue
FieldDefinitionOrderValueModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\History\Models\ChangeValue
;
10
11
use
Commercetools\Base\DateTimeImmutableCollection
;
12
use
Commercetools\Base\JsonObject
;
13
use
Commercetools\Base\JsonObjectModel
;
14
use
Commercetools\Base\MapperFactory
;
15
use stdClass;
16
use
Commercetools\History\Models\Common\LocalizedString
;
17
use
Commercetools\History\Models\Common\LocalizedStringModel
;
18
22
final
class
FieldDefinitionOrderValueModel
extends
JsonObjectModel
implements
FieldDefinitionOrderValue
23
{
24
25
30
protected
$name
;
31
36
protected
$label
;
37
38
42
public
function
__construct
(
43
?
string
$name
=
null
,
44
?
LocalizedString
$label
=
null
45
) {
46
$this->name =
$name
;
47
$this->label =
$label
;
48
49
}
50
57
public
function
getName
()
58
{
59
if
(is_null($this->name)) {
61
$data = $this->
raw
(self::FIELD_NAME);
62
if
(is_null($data)) {
63
return
null
;
64
}
65
$this->name = (string) $data;
66
}
67
68
return
$this->name
;
69
}
70
77
public
function
getLabel
()
78
{
79
if
(is_null($this->label)) {
81
$data = $this->
raw
(self::FIELD_LABEL);
82
if
(is_null($data)) {
83
return
null
;
84
}
85
86
$this->label =
LocalizedStringModel::of
($data);
87
}
88
89
return
$this->label
;
90
}
91
92
96
public
function
setName
(?
string
$name
): void
97
{
98
$this->name =
$name
;
99
}
100
104
public
function
setLabel
(?
LocalizedString
$label
): void
105
{
106
$this->label =
$label
;
107
}
108
109
110
111
}
Commercetools\Base\BaseJsonObject\raw
raw(string $field)
Definition:
BaseJsonObject.php:57
Commercetools\Base\DateTimeImmutableCollection
Definition:
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition:
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition:
MapperFactory.php:16
Commercetools\Base\MapperMap\of
static of($data=null)
Definition:
MapperMap.php:45
Commercetools\History\Models\ChangeValue\FieldDefinitionOrderValueModel
Definition:
FieldDefinitionOrderValueModel.php:23
Commercetools\History\Models\ChangeValue\FieldDefinitionOrderValueModel\$name
$name
Definition:
FieldDefinitionOrderValueModel.php:30
Commercetools\History\Models\ChangeValue\FieldDefinitionOrderValueModel\getName
getName()
Definition:
FieldDefinitionOrderValueModel.php:57
Commercetools\History\Models\ChangeValue\FieldDefinitionOrderValueModel\setLabel
setLabel(?LocalizedString $label)
Definition:
FieldDefinitionOrderValueModel.php:104
Commercetools\History\Models\ChangeValue\FieldDefinitionOrderValueModel\setName
setName(?string $name)
Definition:
FieldDefinitionOrderValueModel.php:96
Commercetools\History\Models\ChangeValue\FieldDefinitionOrderValueModel\$label
$label
Definition:
FieldDefinitionOrderValueModel.php:36
Commercetools\History\Models\ChangeValue\FieldDefinitionOrderValueModel\__construct
__construct(?string $name=null, ?LocalizedString $label=null)
Definition:
FieldDefinitionOrderValueModel.php:42
Commercetools\History\Models\ChangeValue\FieldDefinitionOrderValueModel\getLabel
getLabel()
Definition:
FieldDefinitionOrderValueModel.php:77
Commercetools\History\Models\Common\LocalizedStringModel
Definition:
LocalizedStringModel.php:17
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\History\Models\ChangeValue\FieldDefinitionOrderValue
Definition:
FieldDefinitionOrderValue.php:16
Commercetools\History\Models\Common\LocalizedString
Definition:
LocalizedString.php:14
Commercetools\History\Models\ChangeValue
Definition:
AssetChangeValue.php:9
Generated by
1.9.1