*/ public function blockedLeaves(CompositionVersion $version): array { $rows = $this->resolver->expand($version); $blocked = ContentElementVersion::query() ->whereIn('id', array_column($rows, 'version_id')) ->where('status', ContentVersionStatus::Gesperrt->value) ->pluck('id') ->all(); return array_values(array_map( fn (array $row): string => $row['path'], array_filter($rows, fn (array $row): bool => in_array($row['version_id'], $blocked, true)), )); } /** * @param list $articles * @return list */ public function missingLeaves(CompositionVersion $version, array $articles): array { $covered = []; foreach ($articles as $article) { $release = $article->currentRelease; if ($release === null) { continue; } foreach ($release->contents()->pluck('content_element_version_id') as $id) { $covered[(int) $id] = true; } } $missing = []; foreach ($this->resolver->expand($version) as $row) { if (! isset($covered[$row['version_id']])) { $missing[] = $row['path']; } } return $missing; } }