app/Module/ModuleThemeTrait.php
public function menuMyPedigree(Tree $tree): ?Menu
    {
        $gedcomid = $tree->getUserPreference(Auth::user(), 'gedcomid');

        $pedigree_chart = app(ModuleService::class)->findByComponent(ModuleChartInterface::class, $tree, Auth::user())
            ->filter(static function (ModuleInterface $module): bool {
                return $module instanceof PedigreeChartModule;
            });

        if ($gedcomid !== '' && $pedigree_chart instanceof PedigreeChartModule) {
            return new Menu(
                I18N::translate('My pedigree'),
                route('pedigree', [
                    'xref' => $gedcomid,
                    'ged'  => $tree->name(),
                ]),
                'menu-mypedigree'
            );
        }

        return null;
    }
public function menuMyPedigree(Tree $tree): ?Menu
    {
        $gedcomid = $tree->getUserPreference(Auth::user(), 'gedcomid');

        $pedigree_chart = app(ModuleService::class)->findByComponent(ModuleChartInterface::class, $tree, Auth::user())
            ->filter(static function (ModuleInterface $module): bool {
                return $module instanceof PedigreeChartModule;
            });

        if ($gedcomid !== '' && $pedigree_chart instanceof PedigreeChartModule) {
            return new Menu(
                I18N::translate('My pedigree'),
                route('pedigree', [
                    'xref' => $gedcomid,
                    'ged'  => $tree->name(),
                ]),
                'menu-mypedigree'
            );
        }

        return null;
    }
public function menuMyPedigree ( Tree $ tree ) : ? Menu { $ gedcomid = $ tree -> getUserPreference ( Auth :: user ( ) , 'gedcomid' ) ; $ pedigree_chart = app ( ModuleService :: class ) -> findByComponent ( ModuleChartInterface :: class , $ tree , Auth :: user ( ) ) -> filter ( static function ( ModuleInterface $ module ) : bool { return $ module instanceof PedigreeChartModule ; } ) ; if ( $ gedcomid !== '' && $ pedigree_chart instanceof PedigreeChartModule ) { return new Menu ( I18N :: translate ( 'My pedigree' ) , route ( 'pedigree' , [ 'xref' => $ gedcomid , 'ged' => $ tree -> name ( ) , ] ) , 'menu-mypedigree' ) ; } return null ; }
A link to the user's individual record.

@param Tree $tree

@return Menu|null
A link to the user s individual record .