Lines Matching refs:tree
92 * @param Tree $tree
96 public function getMenu(Tree $tree): Menu|null argument
98 if ($this->faqsExist($tree, I18N::languageTag())) {
102 'tree' => $tree->name(),
119 $tree = Validator::attributes($request)->treeOptional();
121 if (!$tree instanceof Tree) {
124 $tree = $trees->get(Site::getPreference('DEFAULT_GEDCOM')) ?? $trees->first();
126 if ($tree instanceof Tree) {
127 …direct(route('module', ['module' => $this->name(), 'action' => 'Admin', 'tree' => $tree->name()]));
133 $faqs = $this->faqsForTree($tree);
137 ->where(static function (Builder $query) use ($tree): void {
140 ->orWhere('gedcom_id', '=', $tree->id());
146 ->where(static function (Builder $query) use ($tree): void {
149 ->orWhere('gedcom_id', '=', $tree->id());
153 $title = I18N::translate('Frequently asked questions') . ' — ' . $tree->title();
162 'tree' => $tree,
308 ->mapWithKeys(static fn (Tree $tree): array => [$tree->id() => $tree->title()])
382 $tree = Validator::attributes($request)->tree();
385 $faqs = $this->faqsForTree($tree)
391 'tree' => $tree,
396 * @param Tree $tree
400 private function faqsForTree(Tree $tree): Collection argument
410 ->where(static function (Builder $query) use ($tree): void {
413 ->orWhere('gedcom_id', '=', $tree->id());
428 * @param Tree $tree
433 private function faqsExist(Tree $tree, string $language): bool argument
439 ->where(static function (Builder $query) use ($tree): void {
442 ->orWhere('gedcom_id', '=', $tree->id());