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