Lines Matching refs:tree

152         foreach ($this->tree_service->all() as $tree) {
153 … $include_in_sitemap = Validator::parsedBody($request)->boolean('sitemap' . $tree->id(), false);
154 $tree->setPreference('include_in_sitemap', (string) $include_in_sitemap);
196 … ->filter(static fn (Tree $tree): bool => $tree->getPreference('include_in_sitemap') === '1')
197 ->map(static fn (Tree $tree): int => $tree->id());
276 $tree = Validator::attributes($request)->tree('tree');
280 if ($tree->getPreference('include_in_sitemap') !== '1') {
284 $cache_key = 'sitemap/' . $tree->id() . '/' . $type . '/' . $page . '.xml';
286 …$content = Registry::cache()->file()->remember($cache_key, function () use ($tree, $type, $page): …
287 …$records = $this->sitemapRecords($tree, $type, self::RECORDS_PER_VOLUME, self::RECORDS_PER_VOLUME …
293 'tree' => $tree,
303 * @param Tree $tree
310 private function sitemapRecords(Tree $tree, string $type, int $limit, int $offset): Collection argument
314 $records = $this->sitemapFamilies($tree, $limit, $offset);
318 $records = $this->sitemapIndividuals($tree, $limit, $offset);
322 $records = $this->sitemapMedia($tree, $limit, $offset);
326 $records = $this->sitemapNotes($tree, $limit, $offset);
330 $records = $this->sitemapRepositories($tree, $limit, $offset);
334 $records = $this->sitemapSources($tree, $limit, $offset);
338 $records = $this->sitemapSubmitters($tree, $limit, $offset);
352 * @param Tree $tree
358 private function sitemapFamilies(Tree $tree, int $limit, int $offset): Collection argument
361 ->where('f_file', '=', $tree->id())
366 ->map(Registry::familyFactory()->mapper($tree));
370 * @param Tree $tree
376 private function sitemapIndividuals(Tree $tree, int $limit, int $offset): Collection argument
379 ->where('i_file', '=', $tree->id())
384 ->map(Registry::individualFactory()->mapper($tree));
388 * @param Tree $tree
394 private function sitemapMedia(Tree $tree, int $limit, int $offset): Collection argument
397 ->where('m_file', '=', $tree->id())
402 ->map(Registry::mediaFactory()->mapper($tree));
406 * @param Tree $tree
412 private function sitemapNotes(Tree $tree, int $limit, int $offset): Collection argument
415 ->where('o_file', '=', $tree->id())
421 ->map(Registry::noteFactory()->mapper($tree));
425 * @param Tree $tree
431 private function sitemapRepositories(Tree $tree, int $limit, int $offset): Collection argument
434 ->where('o_file', '=', $tree->id())
440 ->map(Registry::repositoryFactory()->mapper($tree));
444 * @param Tree $tree
450 private function sitemapSources(Tree $tree, int $limit, int $offset): Collection argument
453 ->where('s_file', '=', $tree->id())
458 ->map(Registry::sourceFactory()->mapper($tree));
462 * @param Tree $tree
468 private function sitemapSubmitters(Tree $tree, int $limit, int $offset): Collection argument
471 ->where('o_file', '=', $tree->id())
477 ->map(Registry::submitterFactory()->mapper($tree));