1 | <?php |
||
21 | final class VersionBuilder |
||
22 | { |
||
23 | /** |
||
24 | * @var array |
||
25 | */ |
||
26 | private $targetVersionProperties = []; |
||
27 | |||
28 | public function build(): Target\Version |
||
32 | |||
33 | /** |
||
34 | * Set intent to translate, to an unspecified (yet) language, any from the given list. |
||
35 | * |
||
36 | * @param array $languageCodes |
||
37 | * |
||
38 | * @return self |
||
39 | * |
||
40 | * @throws \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException |
||
41 | */ |
||
42 | public function translateToAnyLanguageOf(array $languageCodes): self |
||
54 | |||
55 | /** |
||
56 | * Set intent to create Content from unspecified (yet) content type, any from the given list. |
||
57 | * |
||
58 | * @param array $contentTypeIds |
||
59 | * |
||
60 | * @return self |
||
61 | * |
||
62 | * @throws \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException |
||
63 | */ |
||
64 | public function createFromAnyContentTypeOf(array $contentTypeIds): self |
||
76 | |||
77 | /** |
||
78 | * Set intent to change Version status. |
||
79 | * |
||
80 | * Supported: <code>VersionInfo::STATUS_DRAFT, VersionInfo::STATUS_PUBLISHED, VersionInfo::STATUS_ARCHIVED</code> |
||
81 | * |
||
82 | * @see \eZ\Publish\API\Repository\Values\Content\VersionInfo |
||
83 | * |
||
84 | * @param int $status |
||
85 | * |
||
86 | * @return self |
||
87 | * |
||
88 | * @throws \eZ\Publish\API\Repository\Exceptions\InvalidArgumentException |
||
89 | */ |
||
90 | public function changeStatusTo(int $status): self |
||
106 | |||
107 | /** |
||
108 | * Set intent to update Content Version Fields. |
||
109 | * |
||
110 | * @param string|null $initialLanguageCode |
||
111 | * @param \eZ\Publish\API\Repository\Values\Content\Field[] $fields |
||
112 | * |
||
113 | * @return self |
||
114 | */ |
||
115 | public function updateFieldsTo(?string $initialLanguageCode, array $fields): self |
||
131 | } |
||
132 |