1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
declare(strict_types=1); |
4
|
|
|
|
5
|
|
|
namespace eZ\Publish\Core\Event; |
6
|
|
|
|
7
|
|
|
use Symfony\Component\EventDispatcher\EventDispatcherInterface; |
8
|
|
|
use eZ\Publish\API\Repository\ContentService as ContentServiceInterface; |
9
|
|
|
use eZ\Publish\API\Repository\Values\ContentType\ContentType; |
10
|
|
|
use eZ\Publish\API\Repository\Values\Content\ContentCreateStruct; |
11
|
|
|
use eZ\Publish\API\Repository\Values\Content\ContentInfo; |
12
|
|
|
use eZ\Publish\API\Repository\Values\Content\ContentMetadataUpdateStruct; |
13
|
|
|
use eZ\Publish\API\Repository\Values\Content\ContentUpdateStruct; |
14
|
|
|
use eZ\Publish\API\Repository\Values\Content\LocationCreateStruct; |
15
|
|
|
use eZ\Publish\API\Repository\Values\Content\VersionInfo; |
16
|
|
|
use eZ\Publish\API\Repository\Values\User\User; |
17
|
|
|
|
18
|
|
|
class ContentService implements ContentServiceInterface |
19
|
|
|
{ |
20
|
|
|
/** @var Symfony\Component\EventDispatcher\EventDispatcherInterface */ |
21
|
|
|
protected $eventDispatcher; |
22
|
|
|
|
23
|
|
|
public function __construct(ContentServiceInterface $innerService, EventDispatcherInterface $eventDispatcher) |
|
|
|
|
24
|
|
|
{ |
25
|
|
|
parent::__construct($innerRepository); |
|
|
|
|
26
|
|
|
|
27
|
|
|
$this->eventDispatcher = $eventDispatcher; |
|
|
|
|
28
|
|
|
} |
29
|
|
|
|
30
|
|
|
public function loadContentInfo($contentId) |
31
|
|
|
{ |
32
|
|
|
parent::loadContentInfo($contentId); |
33
|
|
|
} |
34
|
|
|
|
35
|
|
|
public function loadContentInfoList(array $contentIds): iterable |
36
|
|
|
{ |
37
|
|
|
return parent::loadContentInfoList($contentIds); |
38
|
|
|
} |
39
|
|
|
|
40
|
|
|
public function loadContentInfoByRemoteId($remoteId) |
41
|
|
|
{ |
42
|
|
|
parent::loadContentInfoByRemoteId($remoteId); |
43
|
|
|
} |
44
|
|
|
|
45
|
|
|
public function loadVersionInfo(ContentInfo $contentInfo, $versionNo = null) |
46
|
|
|
{ |
47
|
|
|
parent::loadVersionInfo($contentInfo, $versionNo); |
48
|
|
|
} |
49
|
|
|
|
50
|
|
|
public function loadVersionInfoById($contentId, $versionNo = null) |
51
|
|
|
{ |
52
|
|
|
parent::loadVersionInfoById($contentId, $versionNo); |
53
|
|
|
} |
54
|
|
|
|
55
|
|
|
public function loadContentByContentInfo(ContentInfo $contentInfo, array $languages = null, $versionNo = null, $useAlwaysAvailable = true) |
56
|
|
|
{ |
57
|
|
|
parent::loadContentByContentInfo($contentInfo, $languages, $versionNo, $useAlwaysAvailable); |
58
|
|
|
} |
59
|
|
|
|
60
|
|
|
public function loadContentByVersionInfo(VersionInfo $versionInfo, array $languages = null, $useAlwaysAvailable = true) |
61
|
|
|
{ |
62
|
|
|
parent::loadContentByVersionInfo($versionInfo, $languages, $useAlwaysAvailable); |
63
|
|
|
} |
64
|
|
|
|
65
|
|
|
public function loadContent($contentId, array $languages = null, $versionNo = null, $useAlwaysAvailable = true) |
66
|
|
|
{ |
67
|
|
|
parent::loadContent($contentId, $languages, $versionNo, $useAlwaysAvailable); |
68
|
|
|
} |
69
|
|
|
|
70
|
|
|
public function loadContentByRemoteId($remoteId, array $languages = null, $versionNo = null, $useAlwaysAvailable = true) |
71
|
|
|
{ |
72
|
|
|
parent::loadContentByRemoteId($remoteId, $languages, $versionNo, $useAlwaysAvailable); |
73
|
|
|
} |
74
|
|
|
|
75
|
|
|
public function loadContentListByContentInfo(array $contentInfoList, array $languages = [], $useAlwaysAvailable = true) |
76
|
|
|
{ |
77
|
|
|
parent::loadContentListByContentInfo($contentInfoList, $languages, $useAlwaysAvailable); |
78
|
|
|
} |
79
|
|
|
|
80
|
|
|
public function createContent(ContentCreateStruct $contentCreateStruct, array $locationCreateStructs = []) |
81
|
|
|
{ |
82
|
|
|
parent::createContent($contentCreateStruct, $locationCreateStructs); |
83
|
|
|
} |
84
|
|
|
|
85
|
|
|
public function updateContentMetadata(ContentInfo $contentInfo, ContentMetadataUpdateStruct $contentMetadataUpdateStruct) |
86
|
|
|
{ |
87
|
|
|
parent::updateContentMetadata($contentInfo, $contentMetadataUpdateStruct); |
88
|
|
|
} |
89
|
|
|
|
90
|
|
|
public function deleteContent(ContentInfo $contentInfo) |
91
|
|
|
{ |
92
|
|
|
parent::deleteContent($contentInfo); |
93
|
|
|
} |
94
|
|
|
|
95
|
|
|
public function createContentDraft(ContentInfo $contentInfo, VersionInfo $versionInfo = null, User $creator = null) |
96
|
|
|
{ |
97
|
|
|
parent::createContentDraft($contentInfo, $versionInfo, $creator); |
98
|
|
|
} |
99
|
|
|
|
100
|
|
|
public function loadContentDrafts(User $user = null) |
101
|
|
|
{ |
102
|
|
|
parent::loadContentDrafts($user); |
103
|
|
|
} |
104
|
|
|
|
105
|
|
|
public function updateContent(VersionInfo $versionInfo, ContentUpdateStruct $contentUpdateStruct) |
106
|
|
|
{ |
107
|
|
|
parent::updateContent($versionInfo, $contentUpdateStruct); |
108
|
|
|
} |
109
|
|
|
|
110
|
|
|
public function publishVersion(VersionInfo $versionInfo) |
111
|
|
|
{ |
112
|
|
|
parent::publishVersion($versionInfo); |
113
|
|
|
} |
114
|
|
|
|
115
|
|
|
public function deleteVersion(VersionInfo $versionInfo) |
116
|
|
|
{ |
117
|
|
|
parent::deleteVersion($versionInfo); |
118
|
|
|
} |
119
|
|
|
|
120
|
|
|
public function loadVersions(ContentInfo $contentInfo) |
121
|
|
|
{ |
122
|
|
|
parent::loadVersions($contentInfo); |
123
|
|
|
} |
124
|
|
|
|
125
|
|
|
public function copyContent( |
126
|
|
|
ContentInfo $contentInfo, |
127
|
|
|
LocationCreateStruct $destinationLocationCreateStruct, |
128
|
|
|
VersionInfo $versionInfo = null |
129
|
|
|
) { |
130
|
|
|
parent::copyContent($contentInfo, $destinationLocationCreateStruct, $versionInfo); |
131
|
|
|
} |
132
|
|
|
|
133
|
|
|
public function loadRelations(VersionInfo $versionInfo) |
134
|
|
|
{ |
135
|
|
|
parent::loadRelations($versionInfo); |
136
|
|
|
} |
137
|
|
|
|
138
|
|
|
public function loadReverseRelations(ContentInfo $contentInfo) |
139
|
|
|
{ |
140
|
|
|
parent::loadReverseRelations($contentInfo); |
141
|
|
|
} |
142
|
|
|
|
143
|
|
|
public function addRelation(VersionInfo $sourceVersion, ContentInfo $destinationContent) |
144
|
|
|
{ |
145
|
|
|
parent::addRelation($sourceVersion, $destinationContent); |
146
|
|
|
} |
147
|
|
|
|
148
|
|
|
public function deleteRelation(VersionInfo $sourceVersion, ContentInfo $destinationContent) |
149
|
|
|
{ |
150
|
|
|
parent::deleteRelation($sourceVersion, $destinationContent); |
151
|
|
|
} |
152
|
|
|
|
153
|
|
|
public function removeTranslation(ContentInfo $contentInfo, $languageCode) |
154
|
|
|
{ |
155
|
|
|
parent::removeTranslation($contentInfo, $languageCode); |
156
|
|
|
} |
157
|
|
|
|
158
|
|
|
public function deleteTranslation(ContentInfo $contentInfo, $languageCode) |
159
|
|
|
{ |
160
|
|
|
parent::deleteTranslation($contentInfo, $languageCode); |
161
|
|
|
} |
162
|
|
|
|
163
|
|
|
public function deleteTranslationFromDraft(VersionInfo $versionInfo, $languageCode) |
164
|
|
|
{ |
165
|
|
|
parent::deleteTranslationFromDraft($versionInfo, $languageCode); |
166
|
|
|
} |
167
|
|
|
|
168
|
|
|
public function hideContent(ContentInfo $contentInfo): void |
169
|
|
|
{ |
170
|
|
|
parent::hideContent($contentInfo); |
171
|
|
|
} |
172
|
|
|
|
173
|
|
|
public function revealContent(ContentInfo $contentInfo): void |
174
|
|
|
{ |
175
|
|
|
parent::revealContent($contentInfo); |
176
|
|
|
} |
177
|
|
|
|
178
|
|
|
public function newContentCreateStruct(ContentType $contentType, $mainLanguageCode) |
179
|
|
|
{ |
180
|
|
|
parent::newContentCreateStruct($contentType, $mainLanguageCode); |
181
|
|
|
} |
182
|
|
|
|
183
|
|
|
public function newContentMetadataUpdateStruct() |
184
|
|
|
{ |
185
|
|
|
parent::newContentMetadataUpdateStruct(); |
186
|
|
|
} |
187
|
|
|
|
188
|
|
|
public function newContentUpdateStruct() |
189
|
|
|
{ |
190
|
|
|
parent::newContentUpdateStruct(); |
191
|
|
|
} |
192
|
|
|
} |
193
|
|
|
|
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.