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