diff options
| author | Greg Roach <greg@subaqua.co.uk> | 2022-02-05 14:07:42 +0000 |
|---|---|---|
| committer | Greg Roach <greg@subaqua.co.uk> | 2022-02-11 09:10:04 +0000 |
| commit | b315f3e1bccd89f38d8ab5d44d3cc6327d590a57 (patch) | |
| tree | 713e7a727563acff6708648cfd23edbcd7a5b2a6 /app/GedcomRecord.php | |
| parent | 6191ab59bd50c724ad4634cd32a946fe3b996251 (diff) | |
| download | webtrees-b315f3e1bccd89f38d8ab5d44d3cc6327d590a57.tar.gz webtrees-b315f3e1bccd89f38d8ab5d44d3cc6327d590a57.tar.bz2 webtrees-b315f3e1bccd89f38d8ab5d44d3cc6327d590a57.zip | |
Fix: #1584 - Replace FunctionsPrint* with templates
Diffstat (limited to 'app/GedcomRecord.php')
| -rw-r--r-- | app/GedcomRecord.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/GedcomRecord.php b/app/GedcomRecord.php index 868812b726..1d81107154 100644 --- a/app/GedcomRecord.php +++ b/app/GedcomRecord.php @@ -22,7 +22,6 @@ namespace Fisharebest\Webtrees; use Closure; use Exception; use Fisharebest\Webtrees\Contracts\UserInterface; -use Fisharebest\Webtrees\Functions\FunctionsPrint; use Fisharebest\Webtrees\Http\RequestHandlers\GedcomRecordPage; use Fisharebest\Webtrees\Services\PendingChangesService; use Illuminate\Database\Capsule\Manager as DB; @@ -58,6 +57,8 @@ use function str_pad; use function strtoupper; use function trim; +use function view; + use const PHP_INT_MAX; use const PREG_SET_ORDER; use const STR_PAD_LEFT; @@ -536,9 +537,9 @@ class GedcomRecord if ($event->date()->isOK() || $event->place()->gedcomName() !== '') { switch ($style) { case 1: - return '<br><em>' . $event->label() . ' ' . FunctionsPrint::formatFactDate($event, $this, false, false) . $joiner . FunctionsPrint::formatFactPlace($event, false, false, false) . '</em>'; + return '<br><em>' . $event->label() . ' ' . view('fact-date', ['cal_link' => 'false', 'fact' => $event, 'record' => $event->record(), 'time' => false]) . '</em>'; case 2: - return '<dl><dt class="label">' . $event->label() . '</dt><dd class="field">' . FunctionsPrint::formatFactDate($event, $this, false, false) . $joiner . FunctionsPrint::formatFactPlace($event, false, false, false) . '</dd></dl>'; + return '<dl><dt class="label">' . $event->label() . '</dt><dd class="field">' . view('fact-date', ['cal_link' => 'false', 'fact' => $event, 'record' => $event->record(), 'time' => false]) . $joiner . $event->place()->shortName() . '</dd></dl>'; } } } |
