xref: /webtrees/resources/views/modules/family_nav/sidebar.phtml (revision 4a9a60957058ca2a34e30a0d6f783e1540606590)
1<?php
2
3declare(strict_types=1);
4
5use Fisharebest\Webtrees\Individual;
6
7/**
8 * @var Individual $individual
9 */
10
11?>
12<div class="wt-sidebar-content wt-sidebar-family-navigator">
13    <!-- parent families -->
14    <?php foreach ($individual->childFamilies() as $family) : ?>
15        <?= view('modules/family_nav/sidebar-family', ['individual' => $individual, 'family' => $family, 'title' => $individual->getChildFamilyLabel($family)]) ?>
16    <?php endforeach ?>
17
18    <!-- step parents -->
19    <?php foreach ($individual->childStepFamilies() as $family) : ?>
20        <?= view('modules/family_nav/sidebar-family', ['individual' => $individual, 'family' => $family, 'title' => $individual->getStepFamilyLabel($family)]) ?>
21    <?php endforeach ?>
22
23    <!-- spouse and children -->
24    <?php foreach ($individual->spouseFamilies() as $family) : ?>
25        <?= view('modules/family_nav/sidebar-family', ['individual' => $individual, 'family' => $family, 'title' => $individual->getSpouseFamilyLabel($family)]) ?>
26    <?php endforeach ?>
27
28    <!-- step children -->
29    <?php foreach ($individual->spouseStepFamilies() as $family) : ?>
30        <?= view('modules/family_nav/sidebar-family', ['individual' => $individual, 'family' => $family, 'title' => $family->fullName()]) ?>
31    <?php endforeach ?>
32</div>
33