1e759aebbSGreg Roach<?php 2e759aebbSGreg Roach 3*10e06497SGreg Roachdeclare(strict_types=1); 4*10e06497SGreg Roach 5e759aebbSGreg Roachuse Fisharebest\Webtrees\Individual; 6e759aebbSGreg Roachuse Illuminate\Support\Collection; 7e759aebbSGreg Roach 8e759aebbSGreg Roach/** 9e759aebbSGreg Roach * @var Collection|Individual[] $ancestors Indexed by sosa number 10e759aebbSGreg Roach * @var int $generation Draw this generation 11e759aebbSGreg Roach * @var int $generations Final generation to draw 12e759aebbSGreg Roach * @var Collection|string[] $links Links to extend the tree 13e759aebbSGreg Roach * @var int $sosa Draw this individual 14bb1ec7dcSGreg Roach * @var string $spacer 15e759aebbSGreg Roach */ 16e759aebbSGreg Roach?> 17e759aebbSGreg Roach 18e759aebbSGreg Roach<div class="d-flex flex-column"> 19e759aebbSGreg Roach <?php if ($generation < $generations) : ?> 20e759aebbSGreg Roach <div class="d-flex"> 21bb1ec7dcSGreg Roach <?= view('modules/pedigree-chart/chart-up', ['ancestors' => $ancestors, 'sosa' => $sosa * 2, 'generation' => $generation + 1, 'generations' => $generations, 'links' => $links, 'spacer' => $spacer]) ?> 22e759aebbSGreg Roach 23bb1ec7dcSGreg Roach <?= view('modules/pedigree-chart/chart-up', ['ancestors' => $ancestors, 'sosa' => $sosa * 2 + 1, 'generation' => $generation + 1, 'generations' => $generations, 'links' => $links, 'spacer' => $spacer]) ?> 24e759aebbSGreg Roach </div> 25e759aebbSGreg Roach <?php endif ?> 26e759aebbSGreg Roach 27e759aebbSGreg Roach <div class="position-relative d-flex justify-content-center wt-pedigree-generation wt-generation-fwd-<?= $generation ?> wt-generation-rev-<?= 1 + $generations - $generation ?>"> 281f4c31d9SGreg Roach <!-- lines to the next generation --> 291f4c31d9SGreg Roach <?php if ($generation < $generations) : ?> 301f4c31d9SGreg Roach <div class="wt-pedigree-lines position-absolute"></div> 311f4c31d9SGreg Roach <?php endif ?> 321f4c31d9SGreg Roach 3312c7ed82SGreg Roach <div class="d-flex flex-column align-items-center position-relative"> 34bb1ec7dcSGreg Roach <?php if ($generation === $generations) : ?> 35bb1ec7dcSGreg Roach <?= $links->get($sosa, $spacer) ?> 36e759aebbSGreg Roach <?php endif ?> 37e759aebbSGreg Roach 3839c990acSGreg Roach <?= view('chart-box', ['individual' => $ancestors->get($sosa)]) ?> 39e759aebbSGreg Roach 40e759aebbSGreg Roach <?php if ($sosa === 1) : ?> 41e759aebbSGreg Roach <?= $links->get(1) ?> 42e759aebbSGreg Roach <?php endif ?> 43e759aebbSGreg Roach </div> 44e759aebbSGreg Roach </div> 45e759aebbSGreg Roach</div> 46e759aebbSGreg Roach 47