Lines Matching refs:tree
62 * @param Tree $tree
69 public function getBlock(Tree $tree, int $block_id, string $context, array $config = []): string argument
74 'favorites' => $this->getFavorites($tree, Auth::user()),
76 'tree' => $tree,
126 * @param Tree $tree
131 public function getFavorites(Tree $tree, UserInterface $user): array argument
134 ->where('gedcom_id', '=', $tree->id())
137 ->map(static function (object $row) use ($tree): object {
139 $row->record = Registry::gedcomRecordFactory()->make($row->xref, $tree);
161 $tree = Validator::attributes($request)->tree();
168 $record = $this->getRecordForType($type, $xref, $tree);
172 $this->addUrlFavorite($tree, $user, $url, $title ?: $url, $note);
176 $this->addRecordFavorite($tree, $user, $record, $note);
180 $url = route(UserPage::class, ['tree' => $tree->name()]);
192 $tree = Validator::attributes($request)->tree();
203 $url = route(UserPage::class, ['tree' => $tree->name()]);
209 * @param Tree $tree
217 …private function addUrlFavorite(Tree $tree, UserInterface $user, string $url, string $title, strin… argument
220 'gedcom_id' => $tree->id(),
231 * @param Tree $tree
238 …private function addRecordFavorite(Tree $tree, UserInterface $user, GedcomRecord $record, string $… argument
241 'gedcom_id' => $tree->id(),
250 private function getRecordForType(string $type, string $xref, Tree $tree): GedcomRecord|null argument
254 return Registry::individualFactory()->make($xref, $tree);
257 return Registry::familyFactory()->make($xref, $tree);
260 return Registry::sourceFactory()->make($xref, $tree);
263 return Registry::repositoryFactory()->make($xref, $tree);
266 return Registry::mediaFactory()->make($xref, $tree);