commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-history
src
Models
Label
LocalizedLabelBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\History\Models\Label
;
10
11
use
Commercetools\Base\Builder
;
12
use
Commercetools\Base\DateTimeImmutableCollection
;
13
use
Commercetools\Base\JsonObject
;
14
use
Commercetools\Base\JsonObjectModel
;
15
use
Commercetools\Base\MapperFactory
;
16
use stdClass;
17
use
Commercetools\History\Models\Common\LocalizedString
;
18
use
Commercetools\History\Models\Common\LocalizedStringBuilder
;
19
23
final
class
LocalizedLabelBuilder
implements
Builder
24
{
29
private
$value;
30
37
public
function
getValue
()
38
{
39
return
$this->value instanceof
LocalizedStringBuilder
? $this->value->
build
() : $this->value;
40
}
41
46
public
function
withValue
(?
LocalizedString
$value)
47
{
48
$this->value = $value;
49
50
return
$this;
51
}
52
57
public
function
withValueBuilder
(?
LocalizedStringBuilder
$value)
58
{
59
$this->value = $value;
60
61
return
$this;
62
}
63
64
public
function
build
():
LocalizedLabel
65
{
66
return
new
LocalizedLabelModel
(
67
$this->value instanceof
LocalizedStringBuilder
? $this->value->
build
() : $this->value
68
);
69
}
70
71
public
static
function
of
():
LocalizedLabelBuilder
72
{
73
return
new
self
();
74
}
75
}
Commercetools\Base\DateTimeImmutableCollection
Definition:
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition:
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition:
MapperFactory.php:16
Commercetools\History\Models\Common\LocalizedStringBuilder
Definition:
LocalizedStringBuilder.php:20
Commercetools\History\Models\Common\LocalizedStringBuilder\build
build()
Definition:
LocalizedStringBuilder.php:42
Commercetools\History\Models\Label\LocalizedLabelBuilder
Definition:
LocalizedLabelBuilder.php:24
Commercetools\History\Models\Label\LocalizedLabelBuilder\getValue
getValue()
Definition:
LocalizedLabelBuilder.php:37
Commercetools\History\Models\Label\LocalizedLabelBuilder\withValueBuilder
withValueBuilder(?LocalizedStringBuilder $value)
Definition:
LocalizedLabelBuilder.php:57
Commercetools\History\Models\Label\LocalizedLabelBuilder\of
static of()
Definition:
LocalizedLabelBuilder.php:71
Commercetools\History\Models\Label\LocalizedLabelBuilder\withValue
withValue(?LocalizedString $value)
Definition:
LocalizedLabelBuilder.php:46
Commercetools\History\Models\Label\LocalizedLabelBuilder\build
build()
Definition:
LocalizedLabelBuilder.php:64
Commercetools\History\Models\Label\LocalizedLabelModel
Definition:
LocalizedLabelModel.php:23
Commercetools\Base\Builder
Definition:
Builder.php:16
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\History\Models\Common\LocalizedString
Definition:
LocalizedString.php:14
Commercetools\History\Models\Label\LocalizedLabel
Definition:
LocalizedLabel.php:16
Commercetools\History\Models\Label
Definition:
AssociateRoleLabel.php:9
Generated by
1.9.1