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