@@ 269-283 (lines=15) @@ | ||
266 | /** |
|
267 | * {@inheritdoc} |
|
268 | */ |
|
269 | public function deleteCollections(FilterCollections $collections): void |
|
270 | { |
|
271 | $collections = $this->ezInfoCollectionRepository |
|
272 | ->findBy([ |
|
273 | 'contentObjectId' => $collections->getContentId(), |
|
274 | 'id' => $collections->getCollectionIds(), |
|
275 | ]); |
|
276 | ||
277 | foreach ($collections as $collection) { |
|
278 | $attributes = $this->ezInfoCollectionAttributeRepository->findBy(['informationCollectionId' => $collection->getId()]); |
|
279 | $this->ezInfoCollectionAttributeRepository->remove($attributes); |
|
280 | } |
|
281 | ||
282 | $this->ezInfoCollectionRepository->remove($collections); |
|
283 | } |
|
284 | ||
285 | /** |
|
286 | * {@inheritdoc} |
|
@@ 288-301 (lines=14) @@ | ||
285 | /** |
|
286 | * {@inheritdoc} |
|
287 | */ |
|
288 | public function deleteCollectionByContent(Contents $contents): void |
|
289 | { |
|
290 | $collections = $this->ezInfoCollectionRepository |
|
291 | ->findBy([ |
|
292 | 'contentObjectId' => $contents->getContents(), |
|
293 | ]); |
|
294 | ||
295 | foreach ($collections as $collection) { |
|
296 | $attributes = $this->ezInfoCollectionAttributeRepository->findBy(['informationCollectionId' => $collection->getId()]); |
|
297 | $this->ezInfoCollectionAttributeRepository->remove($attributes); |
|
298 | } |
|
299 | ||
300 | $this->ezInfoCollectionRepository->remove($collections); |
|
301 | } |
|
302 | ||
303 | /** |
|
304 | * @param UserReference $userReference |