'; return; } $module_service = app(ModuleService::class); $menus = $module_service->findByComponent(ModuleChartInterface::class, $individual->tree(), Auth::user())->map(static function (ModuleChartInterface $module) use ($individual): ?Menu { return $module->chartBoxMenu($individual); })->filter(); foreach ($individual->spouseFamilies() as $family) { $menus->push(new Menu('' . I18N::translate('Family with spouse') . '', $family->url())); $spouse = $family->spouse($individual); if ($spouse && $spouse->canShow()) { $menus->push(new Menu($spouse->fullName(), $spouse->url())); } foreach ($family->children() as $child) { if ($child->canShow()) { $menus->push(new Menu($child->fullName(), $child->url())); } } } // Do not show these facts in the expanded chart boxes. $exclude = [ 'ADDR', 'ALIA', 'ASSO', 'CHAN', 'CHIL', 'EMAIL', 'FAMC', 'FAMS', 'HUSB', 'NAME', 'NOTE', 'OBJE', 'PHON', 'RESI', 'RESN', 'SEX', 'SOUR', 'SSN', 'SUBM', 'TITL', 'URL', 'WIFE', 'WWW', '_EMAIL', '_TODO', '_UID', '_WT_OBJE_SORT', ]; /** @var Collection|Fact[] $all_facts */ $all_facts = $individual->facts(); foreach ($individual->spouseFamilies() as $family) { foreach ($family->facts() as $fact) { $all_facts->push($fact); } } $all_facts = $all_facts->filter(static function (Fact $fact) use ($exclude): bool { return !in_array($fact->getTag(), $exclude, true); }); $all_facts = Fact::sortFacts($all_facts); $id = Uuid::uuid4()->toString(); /** * @var Individual $individual */ ?>