xref: /webtrees/resources/views/fact-media.phtml (revision 053cb27d4c02c576fc394f4df28726cfc5f6db78)
1<?php
2
3declare(strict_types=1);
4
5use Fisharebest\Webtrees\Fact;
6
7/**
8 * @var Fact $fact
9 */
10
11?>
12
13<?php if (preg_match_all('/\n(2 OBJE\b.*(?:\n[^2].*)*)/', $fact->gedcom(), $matches, PREG_SET_ORDER) > 0) : ?>
14    <div class="wt-fact-media mt-2">
15        <?php foreach ($matches as $match) : ?>
16            <?= view('fact-gedcom-fields', ['gedcom' => $match[1], 'parent' => $fact->tag(), 'tree' => $fact->record()->tree()]) ?>
17        <?php endforeach ?>
18    </div>
19<?php endif ?>
20