$criteria->
setOffset(($criteria->
getOffset() +
$limit) - \
count($unusedIds));
} } /**
* @param array<string> $ids
*
* @return array<string>
*/
private function dispatchEvent(array
$ids): array
{ $event =
new UnusedMediaSearchEvent(array_values($ids));
$this->eventDispatcher->
dispatch($event);
return $event->
getUnusedIds();
} /**
* Here we attempt to exclude entity associations that are extending the behaviour of the media entity rather than
* referencing media. For example, `MediaThumbnailDefinition` adds thumbnail support, whereas `ProductMediaDefinition`
* adds support for images to products.
*/
private function isInsideTopLevelDomain(string
$domain, EntityDefinition
$definition): bool
{