commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-import
src
Models
Customfields
LocalizedStringFieldBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Import\Models\Customfields
;
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
Commercetools\Import\Models\Common\LocalizedString
;
17
use
Commercetools\Import\Models\Common\LocalizedStringBuilder
;
18
use stdClass;
19
23
final
class
LocalizedStringFieldBuilder
implements
Builder
24
{
29
private
$value;
30
42
public
function
getValue
()
43
{
44
return
$this->value instanceof
LocalizedStringBuilder
? $this->value->
build
() : $this->value;
45
}
46
51
public
function
withValue
(?
LocalizedString
$value)
52
{
53
$this->value = $value;
54
55
return
$this;
56
}
57
62
public
function
withValueBuilder
(?
LocalizedStringBuilder
$value)
63
{
64
$this->value = $value;
65
66
return
$this;
67
}
68
69
public
function
build
():
LocalizedStringField
70
{
71
return
new
LocalizedStringFieldModel
(
72
$this->value instanceof
LocalizedStringBuilder
? $this->value->
build
() : $this->value
73
);
74
}
75
76
public
static
function
of
():
LocalizedStringFieldBuilder
77
{
78
return
new
self
();
79
}
80
}
Commercetools\Base\DateTimeImmutableCollection
Definition:
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition:
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition:
MapperFactory.php:16
Commercetools\Import\Models\Common\LocalizedStringBuilder
Definition:
LocalizedStringBuilder.php:20
Commercetools\Import\Models\Common\LocalizedStringBuilder\build
build()
Definition:
LocalizedStringBuilder.php:42
Commercetools\Import\Models\Customfields\LocalizedStringFieldBuilder
Definition:
LocalizedStringFieldBuilder.php:24
Commercetools\Import\Models\Customfields\LocalizedStringFieldBuilder\withValue
withValue(?LocalizedString $value)
Definition:
LocalizedStringFieldBuilder.php:51
Commercetools\Import\Models\Customfields\LocalizedStringFieldBuilder\build
build()
Definition:
LocalizedStringFieldBuilder.php:69
Commercetools\Import\Models\Customfields\LocalizedStringFieldBuilder\withValueBuilder
withValueBuilder(?LocalizedStringBuilder $value)
Definition:
LocalizedStringFieldBuilder.php:62
Commercetools\Import\Models\Customfields\LocalizedStringFieldBuilder\of
static of()
Definition:
LocalizedStringFieldBuilder.php:76
Commercetools\Import\Models\Customfields\LocalizedStringFieldBuilder\getValue
getValue()
Definition:
LocalizedStringFieldBuilder.php:42
Commercetools\Import\Models\Customfields\LocalizedStringFieldModel
Definition:
LocalizedStringFieldModel.php:23
Commercetools\Base\Builder
Definition:
Builder.php:16
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Import\Models\Common\LocalizedString
Definition:
LocalizedString.php:14
Commercetools\Import\Models\Customfields\LocalizedStringField
Definition:
LocalizedStringField.php:16
Commercetools\Import\Models\Customfields
Definition:
BooleanField.php:9
Generated by
1.9.1