@@ 257-271 (lines=15) @@ | ||
254 | /** |
|
255 | * {@inheritdoc} |
|
256 | */ |
|
257 | public function deleteCollections(FilterCollections $collections): void |
|
258 | { |
|
259 | $collections = $this->ezInfoCollectionRepository |
|
260 | ->findBy([ |
|
261 | 'contentObjectId' => $collections->getContentId(), |
|
262 | 'id' => $collections->getCollectionIds(), |
|
263 | ]); |
|
264 | ||
265 | foreach ($collections as $collection) { |
|
266 | $attributes = $this->ezInfoCollectionAttributeRepository->findBy(['informationCollectionId' => $collection->getId()]); |
|
267 | $this->ezInfoCollectionAttributeRepository->remove($attributes); |
|
268 | } |
|
269 | ||
270 | $this->ezInfoCollectionRepository->remove($collections); |
|
271 | } |
|
272 | ||
273 | /** |
|
274 | * {@inheritdoc} |
|
@@ 276-289 (lines=14) @@ | ||
273 | /** |
|
274 | * {@inheritdoc} |
|
275 | */ |
|
276 | public function deleteCollectionByContent(Contents $contents): void |
|
277 | { |
|
278 | $collections = $this->ezInfoCollectionRepository |
|
279 | ->findBy([ |
|
280 | 'contentObjectId' => $contents->getContentIds(), |
|
281 | ]); |
|
282 | ||
283 | foreach ($collections as $collection) { |
|
284 | $attributes = $this->ezInfoCollectionAttributeRepository->findBy(['informationCollectionId' => $collection->getId()]); |
|
285 | $this->ezInfoCollectionAttributeRepository->remove($attributes); |
|
286 | } |
|
287 | ||
288 | $this->ezInfoCollectionRepository->remove($collections); |
|
289 | } |
|
290 | ||
291 | /** |
|
292 | * {@inheritdoc} |