summaryrefslogtreecommitdiff
path: root/resources/views/fact-media.phtml
blob: 78095a356469498f392601f7e813c323c37cad15 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?php

use Fisharebest\Webtrees\Fact;

/**
 * @var Fact $fact
 */

?>

<?php if (preg_match_all('/\n(2 OBJE\b.*(?:\n[^2].*)*)/', $fact->gedcom(), $matches, PREG_SET_ORDER) > 0) : ?>
    <div class="wt-fact-media mt-2">
        <?php foreach ($matches as $match) : ?>
            <?= view('fact-gedcom-fields', ['gedcom' => $match[1], 'parent' => $fact->tag(), 'tree' => $fact->record()->tree()]) ?>
        <?php endforeach ?>
    </div>
<?php endif ?>