diff options
| author | Greg Roach <fisharebest@webtrees.net> | 2019-02-15 21:08:11 +0000 |
|---|---|---|
| committer | Greg Roach <fisharebest@webtrees.net> | 2019-02-16 14:26:05 +0000 |
| commit | 39ca88ba08cefcfcaf891abfcf748f9c808eb326 (patch) | |
| tree | 09fb6844b1e44eeb1755671f00317f914644231b /resources/views/modules | |
| parent | 888ddf4f75ad7e5e5b322ccfa329fb24ddc9af04 (diff) | |
| download | webtrees-39ca88ba08cefcfcaf891abfcf748f9c808eb326.tar.gz webtrees-39ca88ba08cefcfcaf891abfcf748f9c808eb326.tar.bz2 webtrees-39ca88ba08cefcfcaf891abfcf748f9c808eb326.zip | |
Rename functions getFoo() to foo() and return collections instead of arrays
Diffstat (limited to 'resources/views/modules')
29 files changed, 77 insertions, 77 deletions
diff --git a/resources/views/modules/batch_update/admin.phtml b/resources/views/modules/batch_update/admin.phtml index f4964f7bdf..ca7f16ebca 100644 --- a/resources/views/modules/batch_update/admin.phtml +++ b/resources/views/modules/batch_update/admin.phtml @@ -87,7 +87,7 @@ </div> <div class="col-sm-9"> <a class="lead" href="<?= e($record->url()) ?>"> - <?= $record->getFullName() ?> + <?= $record->fullName() ?> </a> <?= $plugin->getActionPreview($record) ?> </div> diff --git a/resources/views/modules/census-assistant.phtml b/resources/views/modules/census-assistant.phtml index 69a7611d50..0146b986c2 100644 --- a/resources/views/modules/census-assistant.phtml +++ b/resources/views/modules/census-assistant.phtml @@ -103,7 +103,7 @@ censusAssistant.setAttribute('hidden', ''); document.querySelector('#census-assistant-class').value = census; - document.querySelector('#census-assistant-title').value = censusYear + ' ' + censusPlace + ' - <?= I18N::translate('Census transcript') ?> - <?= strip_tags($individual->getFullName()) ?> - <?= I18N::translate('Household') ?>'; + document.querySelector('#census-assistant-title').value = censusYear + ' ' + censusPlace + ' - <?= I18N::translate('Census transcript') ?> - <?= strip_tags($individual->fullName()) ?> - <?= I18N::translate('Household') ?>'; fetch('<?= route('module', ['module' => 'GEDFact_assistant', 'action' => 'CensusHeader', 'ged' => $individual->tree()->name()]) ?>&census=' + census) .then(function (response) { diff --git a/resources/views/modules/clippings/show.phtml b/resources/views/modules/clippings/show.phtml index f9404a50d6..f08095ba6f 100644 --- a/resources/views/modules/clippings/show.phtml +++ b/resources/views/modules/clippings/show.phtml @@ -39,7 +39,7 @@ <?php endif ?> <a href="<?= e($record->url()) ?>"> - <?= $record->getFullName() ?> + <?= $record->fullName() ?> </a> </td> <td> diff --git a/resources/views/modules/compact-chart/individual.phtml b/resources/views/modules/compact-chart/individual.phtml index 660ecf8cf5..5430e857a7 100644 --- a/resources/views/modules/compact-chart/individual.phtml +++ b/resources/views/modules/compact-chart/individual.phtml @@ -3,9 +3,9 @@ <?php else : ?> <?= view('chart-box', ['individual' => $individual]) ?> <!-- - <div class="h-100 person_box<?= ['M' => '', 'F' => 'F', 'U' => 'NN'][$individual->getSex()]?> person_box_template"> + <div class="h-100 person_box<?= ['M' => '', 'F' => 'F', 'U' => 'NN'][$individual->sex()]?> person_box_template"> <a href="<?= e($individual->url()) ?>"> - <?= $individual->getFullName() ?> + <?= $individual->fullName() ?> </a> <div class="small"> <?= $individual->getLifeSpan() ?> diff --git a/resources/views/modules/family_nav/sidebar-family.phtml b/resources/views/modules/family_nav/sidebar-family.phtml index 116fc52ebf..dc2fb38f1b 100644 --- a/resources/views/modules/family_nav/sidebar-family.phtml +++ b/resources/views/modules/family_nav/sidebar-family.phtml @@ -8,13 +8,13 @@ </a> </caption> <tbody> - <?php foreach ($family->getSpouses() as $spouse) : ?> - <tr class="text-center wt-family-navigator-parent wt-gender-<?= $spouse->getSex() ?>"> + <?php foreach ($family->spouses() as $spouse) : ?> + <tr class="text-center wt-family-navigator-parent wt-gender-<?= $spouse->sex() ?>"> <th class="text-nowrap align-middle wt-family-navigator-label" scope="row"> <?php if ($spouse === $individual) : ?> <?= Functions::getCloseRelationshipName($individual, $spouse) ?> <i class="icon-selected"></i> - <?php elseif ($spouse->getPrimaryChildFamily() !== null) : ?> + <?php elseif ($spouse->primaryChildFamily() !== null) : ?> <div class="dropdown"> <a class="dropdown-toggle" href="#" role="button" id="dropdown-<?= e($spouse->xref()) ?>" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <?= Functions::getCloseRelationshipName($individual, $spouse) ?> @@ -24,9 +24,9 @@ <div class="dropdown-header wt-family-navigator-dropdown-heading"> <?= I18N::translate('Parents') ?> </div> - <?php foreach ($spouse->getPrimaryChildFamily()->getSpouses() as $parent) : ?> + <?php foreach ($spouse->primaryChildFamily()->spouses() as $parent) : ?> <a class="dropdown-item" href="<?= e($parent->url()) ?>"> - <?= $parent->getFullName() ?> + <?= $parent->fullName() ?> </a> <?php endforeach ?> </div> @@ -39,32 +39,32 @@ <td class="wt-family-navigator-name"> <?php if ($spouse->canShow()) : ?> <a href="<?= e($spouse->url()) ?>"> - <?= $spouse->getFullName() ?> + <?= $spouse->fullName() ?> </a> <div class="small"> <?= $spouse->getLifeSpan() ?> </div> <?php else : ?> - <?= $spouse->getFullName() ?> + <?= $spouse->fullName() ?> <?php endif ?> </td> </tr> <?php endforeach ?> - <?php foreach ($family->getChildren() as $child) : ?> - <tr class="text-center wt-family-navigator-child wt-gender-<?= $child->getSex() ?>"> + <?php foreach ($family->children() as $child) : ?> + <tr class="text-center wt-family-navigator-child wt-gender-<?= $child->sex() ?>"> <th class="text-nowrap align-middle" scope="row"> <?php if ($child === $individual) : ?> <?= Functions::getCloseRelationshipName($individual, $child) ?> <i class="icon-selected"></i> - <?php elseif ($child->getSpouseFamilies() !== []) : ?> + <?php elseif ($child->spouseFamilies() !== []) : ?> <div class="dropdown"> <a class="dropdown-toggle" href="#" role="button" id="dropdown-<?= e($child->xref()) ?>" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <?= Functions::getCloseRelationshipName($individual, $child) ?> </a> <div class="dropdown-menu"> - <?php foreach ($child->getSpouseFamilies() as $n => $in_laws) : ?> + <?php foreach ($child->spouseFamilies() as $n => $in_laws) : ?> <?php if ($n > 0) : ?> <div class="dropdown-divider"></div> <?php endif ?> @@ -72,19 +72,19 @@ <?= I18N::translate('Family') ?> </div> - <?php foreach ($in_laws->getSpouses() as $sibling_in_law) : ?> + <?php foreach ($in_laws->spouses() as $sibling_in_law) : ?> <?php if ($sibling_in_law !== $child) : ?> <a class="dropdown-item" href="<?= e($sibling_in_law->url()) ?>"> - <?= $sibling_in_law->getFullName() ?> + <?= $sibling_in_law->fullName() ?> </a> <?php endif ?> <?php endforeach ?> <ul> - <?php foreach ($in_laws->getChildren() as $child_in_law) : ?> + <?php foreach ($in_laws->children() as $child_in_law) : ?> <li> <a class="dropdown-item" href="<?= e($child_in_law->url()) ?>"> - <?= $child_in_law->getFullName() ?> + <?= $child_in_law->fullName() ?> </a> </li> <?php endforeach ?> @@ -100,13 +100,13 @@ <td> <?php if ($child->canShow()) : ?> <a href="<?= e($child->url()) ?>"> - <?= $child->getFullName() ?> + <?= $child->fullName() ?> </a> <div class="small"> <?= $child->getLifeSpan() ?> </div> <?php else : ?> - <?= $child->getFullName() ?> + <?= $child->fullName() ?> <?php endif ?> </td> </tr> diff --git a/resources/views/modules/family_nav/sidebar.phtml b/resources/views/modules/family_nav/sidebar.phtml index 40032542c1..a32947970a 100644 --- a/resources/views/modules/family_nav/sidebar.phtml +++ b/resources/views/modules/family_nav/sidebar.phtml @@ -1,21 +1,21 @@ <div class="wt-sidebar-content wt-sidebar-family-navigator"> <!-- parent families --> - <?php foreach ($individual->getChildFamilies() as $family) : ?> + <?php foreach ($individual->childFamilies() as $family) : ?> <?= view('modules/family_nav/sidebar-family', ['individual' => $individual, 'family' => $family, 'title' => $individual->getChildFamilyLabel($family)]) ?> <?php endforeach ?> <!-- step parents --> - <?php foreach ($individual->getChildStepFamilies() as $family) : ?> + <?php foreach ($individual->childStepFamilies() as $family) : ?> <?= view('modules/family_nav/sidebar-family', ['individual' => $individual, 'family' => $family, 'title' => $individual->getStepFamilyLabel($family)]) ?> <?php endforeach ?> <!-- spouse and children --> - <?php foreach ($individual->getSpouseFamilies() as $family) : ?> - <?= view('modules/family_nav/sidebar-family', ['individual' => $individual, 'family' => $family, 'title' => $individual->getSpouseFamilyLabel($family)]) ?> + <?php foreach ($individual->spouseFamilies() as $family) : ?> + <?= view('modules/family_nav/sidebar-family', ['individual' => $individual, 'family' => $family, 'title' => $individual->spouse(FamilyLabel($family)]) ?> <?php endforeach ?> <!-- step children --> - <?php foreach ($individual->getSpouseStepFamilies() as $family) : ?> - <?= view('modules/family_nav/sidebar-family', ['individual' => $individual, 'family' => $family, 'title' => $family->getFullName()]) ?> + <?php foreach ($individual->spouse(StepFamilies() as $family) : ?> + <?= view('modules/family_nav/sidebar-family', ['individual' => $individual, 'family' => $family, 'title' => $family->fullName()]) ?> <?php endforeach ?> </div> diff --git a/resources/views/modules/faq/list.phtml b/resources/views/modules/faq/list.phtml index fd394ba5fd..e159aa9626 100644 --- a/resources/views/modules/faq/list.phtml +++ b/resources/views/modules/faq/list.phtml @@ -18,7 +18,7 @@ </td> <td> <a href="<?= e($story->individual->url()) ?>#tab-stories"> - <?= $story->individual->getFullName() ?> + <?= $story->individual->fullName() ?> </a> </td> </tr> diff --git a/resources/views/modules/gedcom_favorites/favorites.phtml b/resources/views/modules/gedcom_favorites/favorites.phtml index af636479cd..e2456c1bdd 100644 --- a/resources/views/modules/gedcom_favorites/favorites.phtml +++ b/resources/views/modules/gedcom_favorites/favorites.phtml @@ -3,7 +3,7 @@ <?php use Fisharebest\Webtrees\Module\ModuleThemeInterface; ?> <?php foreach ($favorites as $favorite) : ?> - <div class="person_box action_header<?= $favorite->record instanceof Individual ? $favorite->record->getSex() : '' ?>"> + <div class="person_box action_header<?= $favorite->record instanceof Individual ? $favorite->record->sex() : '' ?>"> <?php if ($favorite->favorite_type === 'URL') : ?> <a href="<?= e($favorite->url) ?>"><b><?= e($favorite->title) ?></b></a> <?php elseif ($favorite->record instanceof Individual) : ?> diff --git a/resources/views/modules/lifespans-chart/chart.phtml b/resources/views/modules/lifespans-chart/chart.phtml index 974f223c93..27d0a89d1c 100644 --- a/resources/views/modules/lifespans-chart/chart.phtml +++ b/resources/views/modules/lifespans-chart/chart.phtml @@ -14,14 +14,14 @@ <?php foreach ($lifespans as $lifespan) : ?> <a href="<?= e($lifespan->id) ?>" data-toggle="collapse" data-target="#<?= e($lifespan->id) ?>" aria-expanded="false" aria-controls="<?= e($lifespan->id) ?>"> <div class="wt-lifespans-individual position-absolute text-nowrap text-truncate" dir="auto" style="background: <?= $lifespan->background ?>; <?= $dir === 'ltr' ? 'left' : 'right' ?>:<?= ($lifespan->birth_year - $start_year) * 7 ?>px; top:<?= $lifespan->row * 1.5 ?>rem; width:<?= ($lifespan->death_year - $lifespan->birth_year) * 7 + 5 ?>px;"> - <?= $lifespan->individual->getFullName() ?> + <?= $lifespan->individual->fullName() ?> <?= strip_tags($lifespan->individual->getLifespan()) ?> </div> </a> <div class="wt-lifespans-summary collapse position-absolute" id="<?= e($lifespan->id) ?>" style="<?= $dir === 'ltr' ? 'left' : 'right' ?>:<?= (min($lifespan->birth_year, $end_year - 50) - $start_year) * 7 ?>px; top:<?= ($lifespan->row + 1) * 1.5 ?>rem; width:350px;"> <a class="wt-lifespans-summary-link" href="<?= e($lifespan->individual->url()) ?>"> - <?= $lifespan->individual->getFullName() ?> + <?= $lifespan->individual->fullName() ?> </a> <?php foreach ($lifespan->individual->facts(array_merge(Gedcom::BIRTH_EVENTS, Gedcom::DEATH_EVENTS), true) as $fact) : ?> diff --git a/resources/views/modules/lightbox/tab.phtml b/resources/views/modules/lightbox/tab.phtml index db243f652e..ebc6df3930 100644 --- a/resources/views/modules/lightbox/tab.phtml +++ b/resources/views/modules/lightbox/tab.phtml @@ -6,7 +6,7 @@ <?php endforeach ?> <figcaption class="figure-caption wt-album-tab-caption"> <a href="<?= e($media->url()) ?>"> - <?= $media->getFullName() ?> + <?= $media->fullName() ?> </a> </figcaption> </figure> diff --git a/resources/views/modules/personal_facts/tab.phtml b/resources/views/modules/personal_facts/tab.phtml index 9dc91df836..0cd79a265d 100644 --- a/resources/views/modules/personal_facts/tab.phtml +++ b/resources/views/modules/personal_facts/tab.phtml @@ -25,7 +25,7 @@ <?php FunctionsPrintFacts::printFact($fact, $individual) ?> <?php endforeach ?> - <?php if (empty($facts)) : ?> + <?php if ($facts->isEmpty()) : ?> <tr> <td colspan="2"> <?= I18N::translate('There are no facts for this individual.') ?> diff --git a/resources/views/modules/random_media/slide-show.phtml b/resources/views/modules/random_media/slide-show.phtml index 7f36fd3815..ce074213c9 100644 --- a/resources/views/modules/random_media/slide-show.phtml +++ b/resources/views/modules/random_media/slide-show.phtml @@ -23,7 +23,7 @@ <?= $media_file->displayImage(200, 200, '', ['class' => 'slide-show-image']) ?> <figcaption class="slide-show-figcaption"> <a href="<?= e($media->url()) ?>"> - <b><?= $media->getFullName() ?></b> + <b><?= $media->fullName() ?></b> </a> </figcaption> </figure> @@ -36,7 +36,7 @@ <?php foreach ($media->linkedIndividuals('OBJE') as $individual) : ?> <?= I18N::translate('Individual') ?> — <a href="<?= e($individual->url()) ?>" class="slide-show-link"> - <?= $individual->getFullName() ?> + <?= $individual->fullName() ?> </a> <br> <?php endforeach ?> @@ -44,7 +44,7 @@ <?php foreach ($media->linkedFamilies('OBJE') as $family) : ?> <?= I18N::translate('View this family') ?> — <a href="<?= e($family->url()) ?>" class="slide-show-link"> - <?= $family->getFullName() ?> + <?= $family->fullName() ?> </a> <br> <?php endforeach ?> @@ -52,7 +52,7 @@ <?php foreach ($media->linkedSources('OBJE') as $source) : ?> <?= I18N::translate('View this source') ?> — <a href="<?= e($source->url()) ?>" class="slide-show-link"> - <?= $source->getFullName() ?> + <?= $source->fullName() ?> </a> <br> <?php endforeach ?> diff --git a/resources/views/modules/recent_changes/changes-list.phtml b/resources/views/modules/recent_changes/changes-list.phtml index 4c67b10788..dc521eeb43 100644 --- a/resources/views/modules/recent_changes/changes-list.phtml +++ b/resources/views/modules/recent_changes/changes-list.phtml @@ -2,7 +2,7 @@ <?php foreach ($records as $record) : ?> <a href="<?= e($record->url()) ?>" class="list_item name2"> - <?= $record->getFullName() ?> + <?= $record->fullName() ?> </a> <div class="indent mb-1"> <?php if ($record->lastChangeTimestamp() !== '') : ?> diff --git a/resources/views/modules/recent_changes/changes-table.phtml b/resources/views/modules/recent_changes/changes-table.phtml index cb3b65dd4c..4cd3ff361d 100644 --- a/resources/views/modules/recent_changes/changes-table.phtml +++ b/resources/views/modules/recent_changes/changes-table.phtml @@ -50,8 +50,8 @@ <?php endif ?> </td> - <td data-sort="<?= e($record->getSortName()) ?>"> - <a href="<?= e($record->url()) ?>"><?= $record->getFullName() ?></a> + <td data-sort="<?= e($record->sortName()) ?>"> + <a href="<?= e($record->url()) ?>"><?= $record->fullName() ?></a> </td> <td data-sort="<?= $record->lastChangeTimestamp(true) ?>"> diff --git a/resources/views/modules/relatives/family.phtml b/resources/views/modules/relatives/family.phtml index 39f249f43a..6821633379 100644 --- a/resources/views/modules/relatives/family.phtml +++ b/resources/views/modules/relatives/family.phtml @@ -19,7 +19,7 @@ $found |= !$fact->isPendingDeletion(); $person = $fact->target(); if ($person instanceof Individual) { - $row_class = 'wt-gender-' . $person->getSex(); + $row_class = 'wt-gender-' . $person->sex(); if ($fact->isPendingAddition()) { $row_class .= ' new'; } elseif ($fact->isPendingDeletion()) { @@ -56,7 +56,7 @@ $person = $fact->target(); if ($person instanceof Individual) { $found |= !$fact->isPendingDeletion(); - $row_class = 'wt-gender-' . $person->getSex(); + $row_class = 'wt-gender-' . $person->sex(); if ($fact->isPendingAddition()) { $row_class .= ' new'; } elseif ($fact->isPendingDeletion()) { @@ -136,7 +136,7 @@ foreach ($family->facts(['CHIL'], false, $fam_access_level) as $fact) { $person = $fact->target(); if ($person instanceof Individual) { - $row_class = 'wt-gender-' . $person->getSex(); + $row_class = 'wt-gender-' . $person->sex(); if ($fact->isPendingAddition()) { $child_number++; $row_class .= ' new'; @@ -190,7 +190,7 @@ <?php if ($family->canEdit()) : ?> <tr> <th scope="row"> - <?php if (count($family->getChildren()) > 1) : ?> + <?php if (count($family->children()) > 1) : ?> <a href="<?= e(route('reorder-children', ['ged' => $family->tree()->name(), 'xref' => $family->xref()])) ?>"> <?= view('icons/reorder') ?> <?= I18N::translate('Re-order children') ?> diff --git a/resources/views/modules/relatives/tab.phtml b/resources/views/modules/relatives/tab.phtml index 4366776d16..56a618ec66 100644 --- a/resources/views/modules/relatives/tab.phtml +++ b/resources/views/modules/relatives/tab.phtml @@ -75,7 +75,7 @@ 'individual' => $individual, 'family' => $family, 'type' => 'FAMS', - 'label' => $family->getFullName(), + 'label' => $family->fullName(), 'fam_access_level' => $fam_access_level, ]) ?> <?php endforeach ?> @@ -105,7 +105,7 @@ <tr> <td> <a href="<?= e(route('add-spouse-to-individual', ['ged' => $individual->tree()->name(), 'xref' => $individual->xref()])) ?>"> - <?php if ($individual->getSex() !== 'F') : ?> + <?php if ($individual->sex() !== 'F') : ?> <?= I18N::translate('Add a wife') ?> <?php else : ?> <?= I18N::translate('Add a husband') ?> @@ -117,7 +117,7 @@ <tr> <td> <a href="<?= e(route('link-spouse-to-individual', ['ged' => $individual->tree()->name(), 'xref' => $individual->xref()])) ?>"> - <?php if ($individual->getSex() !== 'F') : ?> + <?php if ($individual->sex() !== 'F') : ?> <?= I18N::translate('Add a wife using an existing individual') ?> <?php else : ?> <?= I18N::translate('Add a husband using an existing individual') ?> diff --git a/resources/views/modules/sitemap/sitemap-file.xml.phtml b/resources/views/modules/sitemap/sitemap-file.xml.phtml index cffa7f9ff3..68720591bd 100644 --- a/resources/views/modules/sitemap/sitemap-file.xml.phtml +++ b/resources/views/modules/sitemap/sitemap-file.xml.phtml @@ -3,8 +3,8 @@ <?php foreach ($records as $record) : ?> <url> <loc><?= e($record->url()) ?></loc> - <?php if ($record->getFirstFact('CHAN') !== null) : ?> - <lastmod><?= $record->getFirstFact('CHAN')->date()->minimumDate()->Format('%Y-%m-%d') ?></lastmod> + <?php if ($record->firstFact('CHAN') !== null) : ?> + <lastmod><?= $record->firstFact('CHAN')->date()->minimumDate()->Format('%Y-%m-%d') ?></lastmod> <?php endif ?> </url> <?php endforeach ?> diff --git a/resources/views/modules/stories/config.phtml b/resources/views/modules/stories/config.phtml index 476c64c6b7..37b155d8c9 100644 --- a/resources/views/modules/stories/config.phtml +++ b/resources/views/modules/stories/config.phtml @@ -42,7 +42,7 @@ <td> <?php if ($story->individual !== null) : ?> <a href="<?= e($story->individual->url()) ?>#tab-stories"> - <?= $story->individual->getFullName() ?> + <?= $story->individual->fullName() ?> </a> <?php else : ?> <?= $story->xref ?> diff --git a/resources/views/modules/stories/list.phtml b/resources/views/modules/stories/list.phtml index fd394ba5fd..e159aa9626 100644 --- a/resources/views/modules/stories/list.phtml +++ b/resources/views/modules/stories/list.phtml @@ -18,7 +18,7 @@ </td> <td> <a href="<?= e($story->individual->url()) ?>#tab-stories"> - <?= $story->individual->getFullName() ?> + <?= $story->individual->fullName() ?> </a> </td> </tr> diff --git a/resources/views/modules/timeline-chart/chart.phtml b/resources/views/modules/timeline-chart/chart.phtml index 03e31eb95a..f7d7dc332b 100644 --- a/resources/views/modules/timeline-chart/chart.phtml +++ b/resources/views/modules/timeline-chart/chart.phtml @@ -317,17 +317,17 @@ $col = array_search($event->record(), $individuals); if ($col === false) { // Marriage event - use the color of the husband - $col = array_search($event->record()->getHusband(), $individuals); + $col = array_search($event->record()->husband(), $individuals); } if ($col === false) { // Marriage event - use the color of the wife - $col = array_search($event->record()->getWife(), $individuals); + $col = array_search($event->record()->wife(), $individuals); } $col = $col % 6; echo '</td><td class="person' . $col . '">'; if (count($individuals) > 6) { // We only have six colours, so show naes if more than this number - echo $event->record()->getFullName() . ' — '; + echo $event->record()->fullName() . ' — '; } $record = $event->record(); echo $event->label(); @@ -336,13 +336,13 @@ echo FunctionsPrint::formatFactDate($event, $record, false, false); } elseif ($record instanceof Family) { echo $gdate->display(); - if ($record->getHusband() && $record->getHusband()->getBirthDate()->isOK()) { - $ageh = FunctionsDate::getAgeAtEvent(Date::getAgeGedcom($record->getHusband()->getBirthDate(), $gdate)); + if ($record->husband() && $record->husband()->getBirthDate()->isOK()) { + $ageh = FunctionsDate::getAgeAtEvent(Date::getAgeGedcom($record->husband()->getBirthDate(), $gdate)); } else { $ageh = null; } - if ($record->getWife() && $record->getWife()->getBirthDate()->isOK()) { - $agew = FunctionsDate::getAgeAtEvent(Date::getAgeGedcom($record->getWife()->getBirthDate(), $gdate)); + if ($record->wife() && $record->wife()->getBirthDate()->isOK()) { + $agew = FunctionsDate::getAgeAtEvent(Date::getAgeGedcom($record->wife()->getBirthDate(), $gdate)); } else { $agew = null; } @@ -360,7 +360,7 @@ } // Print spouses names for family events if ($event->record() instanceof Family) { - echo ' — <a href="', e($event->record()->url()), '">', $event->record()->getFullName(), '</a>'; + echo ' — <a href="', e($event->record()->url()), '">', $event->record()->fullName(), '</a>'; } echo '</td></tr></table>'; echo '</div>'; diff --git a/resources/views/modules/timeline-chart/page.phtml b/resources/views/modules/timeline-chart/page.phtml index a3fdb63c50..1779e991ff 100644 --- a/resources/views/modules/timeline-chart/page.phtml +++ b/resources/views/modules/timeline-chart/page.phtml @@ -57,10 +57,10 @@ <div class="col-md-6 col-lg-4 col-xl-3 person<?= $n % 6 ?>"> <?= $individual->getSexImage('large'); ?> <a href="<?= e($individual->url()) ?>"> - <?= $individual->getFullName() ?> - <?php if ($individual->getAddName() !== '') : ?> + <?= $individual->fullName() ?> + <?php if ($individual->alternateName() !== '') : ?> <br> - <?= $individual->getAddName() ?> + <?= $individual->alternateName() ?> <?php endif ?> </a> <a href="<?= e($remove_urls[$individual->xref()]) ?>"> diff --git a/resources/views/modules/todays_events/list.phtml b/resources/views/modules/todays_events/list.phtml index 75017d06f9..b04e2489c0 100644 --- a/resources/views/modules/todays_events/list.phtml +++ b/resources/views/modules/todays_events/list.phtml @@ -4,7 +4,7 @@ <?php foreach ($facts as $fact) : ?> <?php $record = $fact->record(); ?> <a href="<?= e($record->url()) ?>" class="list_item name2"> - <?= $record->getFullName() ?> + <?= $record->fullName() ?> </a> <?php if ($record instanceof Individual) : ?> <?= $record->getSexImage() ?> diff --git a/resources/views/modules/todays_events/table.phtml b/resources/views/modules/todays_events/table.phtml index 0b3ff09f49..d7a9c41f5d 100644 --- a/resources/views/modules/todays_events/table.phtml +++ b/resources/views/modules/todays_events/table.phtml @@ -24,9 +24,9 @@ <?php foreach ($facts as $fact) : ?> <?php $record = $fact->record(); ?> <tr> - <td data-sort="<?= e($record->getSortName()) ?>"> + <td data-sort="<?= e($record->sortName()) ?>"> <a href="<?= e($record->url()) ?>"> - <?= $record->getFullName() ?> + <?= $record->fullName() ?> </a> <?php if ($record instanceof Individual) : ?> <?= $record->getSexImage() ?> diff --git a/resources/views/modules/todo/research-tasks.phtml b/resources/views/modules/todo/research-tasks.phtml index ddd01fc401..94674ad596 100644 --- a/resources/views/modules/todo/research-tasks.phtml +++ b/resources/views/modules/todo/research-tasks.phtml @@ -24,9 +24,9 @@ <td data-sort="<?= $task->date()->julianDay() ?>" class="d-none d-md-table-cell wt-side-block-optional"> <?= $task->date()->display() ?> </td> - <td data-sort="<?= e($task->record()->getSortName()) ?>"> + <td data-sort="<?= e($task->record()->sortName()) ?>"> <a href="<?= e($task->record()->url()) ?>"> - <?= $task->record()->getFullName() ?> + <?= $task->record()->fullName() ?> </a> </td> <td class="d-none d-md-table-cell wt-side-block-optional"> diff --git a/resources/views/modules/upcoming_events/list.phtml b/resources/views/modules/upcoming_events/list.phtml index c708ad8bab..070fac114d 100644 --- a/resources/views/modules/upcoming_events/list.phtml +++ b/resources/views/modules/upcoming_events/list.phtml @@ -4,7 +4,7 @@ <?php foreach ($facts as $fact) : ?> <?php $record = $fact->record(); ?> <a href="<?= e($record->url()) ?>" class="list_item name2"> - <?= $record->getFullName() ?> + <?= $record->fullName() ?> </a> <?php if ($record instanceof Individual) : ?> <?= $record->getSexImage() ?> diff --git a/resources/views/modules/upcoming_events/table.phtml b/resources/views/modules/upcoming_events/table.phtml index 0b3ff09f49..d7a9c41f5d 100644 --- a/resources/views/modules/upcoming_events/table.phtml +++ b/resources/views/modules/upcoming_events/table.phtml @@ -24,9 +24,9 @@ <?php foreach ($facts as $fact) : ?> <?php $record = $fact->record(); ?> <tr> - <td data-sort="<?= e($record->getSortName()) ?>"> + <td data-sort="<?= e($record->sortName()) ?>"> <a href="<?= e($record->url()) ?>"> - <?= $record->getFullName() ?> + <?= $record->fullName() ?> </a> <?php if ($record instanceof Individual) : ?> <?= $record->getSexImage() ?> diff --git a/resources/views/modules/user_favorites/favorites.phtml b/resources/views/modules/user_favorites/favorites.phtml index c1a97c320a..1429780524 100644 --- a/resources/views/modules/user_favorites/favorites.phtml +++ b/resources/views/modules/user_favorites/favorites.phtml @@ -3,7 +3,7 @@ <?php use Fisharebest\Webtrees\Module\ModuleThemeInterface; ?> <?php foreach ($favorites as $favorite) : ?> - <div class="person_box action_header<?= $favorite->record instanceof Individual ? $favorite->record->getSex() : '' ?>"> + <div class="person_box action_header<?= $favorite->record instanceof Individual ? $favorite->record->sex() : '' ?>"> <?php if ($favorite->favorite_type === 'URL') : ?> <a href="<?= e($favorite->url) ?>"><b><?= e($favorite->title) ?></b></a> <?php elseif ($favorite->record instanceof Individual) : ?> diff --git a/resources/views/modules/yahrzeit/list.phtml b/resources/views/modules/yahrzeit/list.phtml index 8642f1510b..4b10506110 100644 --- a/resources/views/modules/yahrzeit/list.phtml +++ b/resources/views/modules/yahrzeit/list.phtml @@ -2,7 +2,7 @@ <?php foreach ($yahrzeits as $yahrzeit) : ?> <a href="<?= e($yahrzeit->individual->url()) ?>" class="list_item name2"> - <?= $yahrzeit->individual->getFullName() ?> + <?= $yahrzeit->individual->fullName() ?> </a> <?= $yahrzeit->individual->getSexImage() ?> <div class="indent"> diff --git a/resources/views/modules/yahrzeit/table.phtml b/resources/views/modules/yahrzeit/table.phtml index dcef2d8205..96f678aeca 100644 --- a/resources/views/modules/yahrzeit/table.phtml +++ b/resources/views/modules/yahrzeit/table.phtml @@ -18,12 +18,12 @@ <?php foreach ($yahrzeits as $yahrzeit) : ?> <tr> - <td data-sort="<?= e($yahrzeit->individual->getSortName()) ?>"> + <td data-sort="<?= e($yahrzeit->individual->sortName()) ?>"> <a href="<?= e($yahrzeit->individual->url()) ?>"> - <?= $yahrzeit->individual->getFullname() ?> - <?php if ($yahrzeit->individual->getAddName()) : ?> + <?= $yahrzeit->individual->fullName() ?> + <?php if ($yahrzeit->individual->alternateName()) : ?> <br> - <?= $yahrzeit->individual->getAddName() ?> + <?= $yahrzeit->individual->alternateName() ?> <?php endif ?> </a> </td> |
