xref: /webtrees/resources/views/modules/family_nav/sidebar.phtml (revision ac71572d8462e396ed5a307f05b29381e49f9e6e)
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