Home
last modified time | relevance | path

Searched refs:fact (Results 1 – 25 of 258) sorted by relevance

1234567891011

/webtrees/app/Services/
H A DIndividualFactsService.php67 ->filter(fn (Fact $fact): bool => !$exclude_facts->contains($fact->tag()));
83 ->filter(fn (Fact $fact): bool => !$exclude_facts->contains($fact->tag()));
105 foreach ($associate->facts() as $fact) {
106 if (preg_match('/\n\d _?ASSO @' . $individual->xref() . '@/', $fact->gedcom())) {
108 $factrec = explode("\n", $fact->gedcom(), 2)[0];
109 if (preg_match('/\n2 DATE .*/', $fact->gedcom(), $match)) {
112 if (preg_match('/\n2 PLAC .*/', $fact->gedcom(), $match)) {
481 … foreach ($this->childFacts($person, $cfamily, '_GCHI', 'son', $min_date, $max_date) as $fact) {
482 $facts[] = $fact;
486 … foreach ($this->childFacts($person, $cfamily, '_GCHI', 'dau', $min_date, $max_date) as $fact) {
[all …]
/webtrees/resources/views/
H A Dfact.phtml27 $parent = $fact->record();
29 [, $tag] = explode(':', $fact->tag());
30 $label = $fact->label();
31 $value = $fact->value();
32 $type = $fact->attribute('TYPE');
33 $id = $fact->id();
35 $element = Registry::elementFactory()->make($fact->tag());
39 if ($fact->isPendingAddition()) {
42 if ($fact->isPendingDeletion()) {
69 $label = $fact->label();
[all …]
H A Dindividual-page-name.phtml16 $individual = $fact->record();
22 "0 @xref@ INDI\n1 DEAT Y\n" . $fact->gedcom(),
30 if ($fact->isPendingDeletion()) {
32 } elseif ($fact->isPendingAddition()) {
38 <div class="accordion-header" id="name-header-<?= $fact->id() ?>">
39 …se" data-bs-target="#name-content-<?= $fact->id() ?>" aria-expanded="false" aria-controls="name-co…
45 <?php if ($fact->attribute('TYPE') !== '') : ?>
47 …<?= Registry::elementFactory()->make($fact->tag() . ':TYPE')->value($fact->attribute('TYPE'), $tre…
53 …-content-<?= $fact->id() ?>" class="accordion-collapse collapse" data-bs-parent="#individual-names…
57 <dd class="col-md-8 col-lg-9"><bdi><?= e($fact->value()) ?></bdi></dd>
[all …]
H A Dcalendar-list.phtml33 <?php foreach ($individual_anniversaries as $fact) : ?>
35 <a href="<?= e($fact->record()->url()) ?>">
36 <?= $fact->record()->fullName() ?>
40 … <?= $fact->label() ?> — <?= $fact->date()->display($fact->record()->tree()) ?>
41 <?php if ($fact->attribute('PLAC') !== '') : ?>
42 — <?= $fact->attribute('PLAC') ?>
51 <?php foreach ($family_anniversaries as $fact) : ?>
53 <a href="<?= e($fact->record()->url()) ?>">
54 <?= $fact->record()->fullName() ?>
58 … <?= $fact->label() ?> — <?= $fact->date()->display($fact->record()->tree()) ?>
[all …]
H A Dindividual-page-sex.phtml14 $individual = $fact->record();
18 if ($fact->isPendingDeletion()) {
20 } elseif ($fact->isPendingAddition()) {
26 <div class="accordion-header" id="name-header-<?= $fact->id() ?>">
27 …se" data-bs-target="#name-content-<?= $fact->id() ?>" aria-expanded="false" aria-controls="name-co…
31 <?= Registry::elementFactory()->make('INDI:SEX')->value($fact->value(), $tree) ?>
34 …-content-<?= $fact->id() ?>" class="accordion-collapse collapse" data-bs-parent="#individual-names…
36 <?= view('fact-sources', ['fact' => $fact]) ?>
37 <?= view('fact-notes', ['fact' => $fact]) ?>
39 <?php if ($fact->canEdit()) : ?>
[all …]
H A Dfact-place.phtml23 <?php if (preg_match('/\n(2 PLAC.*(?:\n[3-9].*)*)/', $fact->gedcom(), $match) === 1) : ?>
25 <?= $fact->place()->fullName($fact->id() !== 'histo') ?>
33 <?php if ($fact->latitude() !== null && $fact->longitude() !== null) : ?>
35 … <span class="label"><?= I18N::translate('Latitude') ?>: </span><?= $fact->latitude() ?>
36 … <span class="label"><?= I18N::translate('Longitude') ?>: </span><?= $fact->longitude()?>
37 …->map(fn (ModuleMapLinkInterface $module): string => ' ' . $module->mapLink($fact))->implode('') ?>
43 …<?= view('fact-gedcom-fields', ['gedcom' => $match[1], 'parent' => $fact->tag() . ':PLAC:NOTE', 't…
48 <?php if (preg_match('/2 TEMP (.+)/', $fact->gedcom(), $match)) : ?>
49 …<?= Registry::elementFactory()->make($fact->tag() . ':TEMP')->labelValue($match[1], $record->tree(…
52 <?php if (preg_match('/2 STAT (.+)/', $fact->gedcom(), $match)) : ?>
[all …]
/webtrees/tests/app/SurnameTradition/
H A DLithuanianSurnameTraditionTest.php215 $fact = $this->createMock(Fact::class);
216 $fact->method('value')->willReturn('John /White/');
219 $individual->method('facts')->willReturn(new Collection([$fact]));
232 $fact = $this->createMock(Fact::class);
233 $fact->method('value')->willReturn('Mary /Whitaitė/');
236 $individual->method('facts')->willReturn(new Collection([$fact]));
243 $fact = $this->createMock(Fact::class);
244 $fact->method('value')->willReturn('Mary /Whitytė/');
247 $individual->method('facts')->willReturn(new Collection([$fact]));
254 $fact = $this->createMock(Fact::class);
[all …]
H A DPolishSurnameTraditionTest.php201 $fact = $this->createMock(Fact::class);
202 $fact->method('value')->willReturn('Chris /White/');
205 $individual->method('facts')->willReturn(new Collection([$fact]));
218 $fact = $this->createMock(Fact::class);
219 $fact->method('value')->willReturn('Chris /Whitecka/');
222 $individual->method('facts')->willReturn(new Collection([$fact]));
229 $fact = $this->createMock(Fact::class);
230 $fact->method('value')->willReturn('Chris /Whitedzka/');
233 $individual->method('facts')->willReturn(new Collection([$fact]));
240 $fact = $this->createMock(Fact::class);
[all …]
H A DPaternalSurnameTraditionTest.php171 $fact = $this->createMock(Fact::class);
172 $fact->method('value')->willReturn('Chris /White/');
175 $individual->method('facts')->willReturn(new Collection([$fact]));
188 $fact = $this->createMock(Fact::class);
189 $fact->method('value')->willReturn('Chris /White/');
192 $individual->method('facts')->willReturn(new Collection([$fact]));
205 $fact = $this->createMock(Fact::class);
206 $fact->method('value')->willReturn('Chris /White/');
209 $individual->method('facts')->willReturn(new Collection([$fact]));
222 $fact = $this->createMock(Fact::class);
[all …]
/webtrees/resources/views/modules/relatives/
H A Dfamily.phtml35 foreach ($family->facts(['HUSB'], false, $fam_access_level) as $fact) {
36 $found |= !$fact->isPendingDeletion();
37 $person = $fact->target();
40 if ($fact->isPendingAddition()) {
42 } elseif ($fact->isPendingDeletion()) {
72 foreach ($family->facts(['WIFE'], false, $fam_access_level) as $fact) {
73 $person = $fact->target();
75 $found |= !$fact->isPendingDeletion();
77 if ($fact->isPendingAddition()) {
79 } elseif ($fact->isPendingDeletion()) {
[all …]
/webtrees/app/
H A DRelationship.php130 …->contains(fn (Fact $fact): bool => $fact->value() === '@' . $nodes[1]->xref() . '@' && $fact->att…
142 …->contains(fn (Fact $fact): bool => $fact->value() === '@' . $nodes[1]->xref() . '@' && $fact->att…
281 … $fact = $family->facts(['ENGA', 'MARR', 'DIV', 'ANUL'], true, Auth::PRIV_HIDE)->last();
283 if ($fact instanceof Fact) {
286 return $fact->tag() === 'FAM:MARR';
289 return $fact->tag() === 'FAM:DIV' || $fact->tag() === 'FAM:ANUL';
292 return $fact->tag() === 'FAM:ENGA';
348 …->contains(fn (Fact $fact): bool => $fact->value() === '@' . $nodes[1]->xref() . '@' && $fact->att…
360 …->contains(fn (Fact $fact): bool => $fact->value() === '@' . $nodes[1]->xref() . '@' && $fact->att…
403 …$nodes[0]->facts(['BIRT'], false, Auth::PRIV_HIDE)->map(fn (Fact $fact): Date => $fact->date())->f…
[all …]
H A DGedcomRecord.php285 $fact = $this->facts(['RESN'])->first();
286 … $locked = $fact instanceof Fact && str_ends_with($fact->value(), RestrictionNotice::VALUE_LOCKED);
310 foreach ($this->facts([], false, $access_level) as $fact) {
311 $gedcom .= "\n" . $fact->gedcom();
538 $fact = $this->facts($facts, true)->first();
540 if ($fact === null) {
547 if ($fact->date()->isOK()) {
548 …ributes[] = view('fact-date', ['cal_link' => 'false', 'fact' => $fact, 'record' => $fact->record()…
551 if ($fact->place()->gedcomName() !== '' && $style === 2) {
552 $attributes[] = $fact->place()->shortName();
[all …]
/webtrees/app/Module/
H A DShareAnniversaryModule.php102 ->filter(fn (Fact $fact): bool => $fact->date()->isOK())
103 ->filter(fn (Fact $fact): bool => $fact->date()->qual1 === '')
104 ->filter(fn (Fact $fact): bool => $fact->date()->minimumDate() instanceof GregorianDate)
105 …->filter(fn (Fact $fact): bool => $fact->date()->minimumJulianDay() === $fact->date()->maximumJuli…
106 ->mapWithKeys(fn (Fact $fact): array => [
107 …:class, ['tree' => $record->tree()->name(), 'xref' => $fact->record()->xref(), 'fact_id' => $fact-…
108 $fact->label() . ' — ' . $fact->date()->display(),
137 $fact = $record->facts()->first(fn (Fact $fact): bool => $fact->id() === $fact_id);
139 if ($fact instanceof Fact) {
142 'DTSTART' => $fact->date()->minimumDate()->format('%Y%m%d'),
[all …]
H A DPlacesModule.php135 foreach ($facts as $id => $fact) {
136 $location = new PlaceLocation($fact->place()->gedcomName());
139 $latitude = $fact->latitude();
140 $longitude = $fact->longitude();
148 $icons = $fact->record() === $indi ? static::OWN_ICONS : static::ICONS;
159 'icon' => $icons[$fact->tag()] ?? static::DEFAULT_ICON,
160 'tooltip' => $fact->place()->gedcomName(),
161 … 'summary' => view('modules/places/event-sidebar', $this->summaryData($indi, $fact)),
200 * @param Fact $fact
204 private function summaryData(Individual $individual, Fact $fact): array argument
[all …]
H A DFixPrimaryTag.php131 …$facts = $record->facts(['_PRIM'])->filter(static fn (Fact $fact): bool => !$fact->isPendingDeleti…
133 foreach ($facts as $fact) {
134 $primary = strtoupper($fact->value()) !== 'N';
140 $record->deleteFact($fact->id(), false);
158 foreach ($facts as $fact) {
159 if ($fact->tag() !== 'INDI:OBJE') {
160 $facts1->push($fact);
161 } elseif ($fact->value() !== '@' . $xref . '@') {
162 $facts3->push($fact);
164 $facts2->push($fact);
[all …]
H A DModuleMapLinkTrait.php48 * @param Fact $fact
52 public function mapLink(Fact $fact): string argument
54 if ($this->isMapAvailableForLocation($fact)) {
56 $url = $this->mapUrl($fact);
76 * @param Fact $fact
80 protected function isMapAvailableForLocation(Fact $fact): bool argument
82 return $fact->latitude() !== null && $fact->longitude() !== null;
94 * @param Fact $fact
98 protected function mapUrl(Fact $fact): string argument
/webtrees/resources/views/edit/
H A Dreorder-families.phtml29 <?php foreach ($fams_facts as $fact) : ?>
30 <input type="hidden" name="order[]" value="<?= e($fact->id()) ?>">
47 <?php foreach ($fams_facts as $fact) : ?>
48 …<div class="card mb-2 wt-sortable-item" data-wt-sort-by-date="<?= $fact->target()->getMarriageDate…
49 <input type="hidden" name="order[]" value="<?= $fact->id() ?>">
51 … <?= view('edit/reorder-card-header', ['title' => $fact->target()->fullName()]) ?>
55 <?= $fact->target()->formatFirstMajorFact(Gedcom::MARRIAGE_EVENTS, 2) ?>
56 <?= $fact->target()->formatFirstMajorFact(Gedcom::DIVORCE_EVENTS, 2) ?>
64 <?php foreach ($famc_facts as $fact) : ?>
65 <input type="hidden" name="order[]" value="<?= e($fact->id()) ?>">
[all …]
/webtrees/resources/views/admin/
H A Dmerge-records-step-2.phtml56 <?php foreach ($facts as $fact) : ?>
59 … <input type="checkbox" name="keep1[]" value="<?= $fact->id() ?>" checked>
62 … <div class="gedcom-data" dir="ltr"><?= e($fact->gedcom()) ?></div>
63 <?php if ($fact->target() instanceof GedcomRecord) : ?>
64 <a href="<?= e($fact->target()->url()) ?>">
65 <?= $fact->target()->fullName() ?>
103 <?php foreach ($facts1 as $fact) : ?>
106 … <input type="checkbox" name="keep1[]" value="<?= $fact->id() ?>" checked>
109 … <div class="gedcom-data" dir="ltr"><?= e($fact->gedcom()) ?></div>
110 <?php if ($fact->target() instanceof GedcomRecord) : ?>
[all …]
/webtrees/app/Http/RequestHandlers/
H A DChangeFamilyMembersAction.php70 foreach ($old_father->facts(['FAMS']) as $fact) {
71 if ($fact->target() === $family) {
72 $old_father->deleteFact($fact->id(), true);
76 foreach ($family->facts(['HUSB', 'WIFE']) as $fact) {
77 if ($fact->target() === $old_father) {
78 $family->deleteFact($fact->id(), true);
93 foreach ($old_mother->facts(['FAMS']) as $fact) {
94 if ($fact->target() === $family) {
95 $old_mother->deleteFact($fact->id(), true);
99 foreach ($family->facts(['HUSB', 'WIFE']) as $fact) {
[all …]
/webtrees/resources/views/lists/
H A Danniversaries-list.phtml21 <?php foreach ($facts as $n => $fact) : ?>
43 <?php $record = $fact->record(); ?>
51 <?= $fact->label() . ' — ' . $fact->date()->display($record->tree(), null, true) ?>
52 <?php if (PHP_INT_SIZE >= 8 || $fact->date()->gregorianYear() > 1901) : ?>
53 … (<?= Registry::timestampFactory()->now()->subtractYears($fact->anniv)->diffForHumans() ?>)
55 … (<?= I18N::plural('%s year', '%s years', $fact->anniv, I18N::number($fact->anniv)) ?>)
57 <?php if ($fact->place()->gedcomName() !== '') : ?>
58 … — <a href="<?= e($fact->place()->url()) ?>" title="<?= strip_tags($fact->place()->fullName()) ?>">
59 <?= $fact->place()->shortName() ?>
/webtrees/resources/views/modules/media/
H A Dtab.phtml29 <?php foreach ($facts as $fact) : ?>
30 <?php if (str_ends_with($fact->tag(), ':OBJE')) : ?>
31 <?= view('fact', ['fact' => $fact, 'record' => $individual]) ?>
34 if ($fact->isPendingAddition()) {
36 } elseif ($fact->isPendingDeletion()) {
45 <?= $fact->label() ?>
46 … <?= view('fact-edit-links', ['fact' => $fact, 'url' => $fact->record()->url() . '#tab-media']) ?>
50 …<?php if (preg_match_all('/\n([2-4] OBJE .*)/', $fact->gedcom(), $matches, PREG_SET_ORDER) > 0) : …
52 …ew('fact-gedcom-fields', ['gedcom' => $match[1], 'parent' => $fact->tag(), 'tree' => $fact->record…
/webtrees/resources/views/modules/sources_tab/
H A Dtab.phtml31 <?php foreach ($facts as $fact) : ?>
32 <?php if (str_ends_with($fact->tag(), ':SOUR')) : ?>
33 <?= view('fact', ['fact' => $fact, 'record' => $individual]) ?>
36 if ($fact->isPendingAddition()) {
38 } elseif ($fact->isPendingDeletion()) {
47 <?= $fact->label() ?>
48 …<?= view('fact-edit-links', ['fact' => $fact, 'url' => $fact->record()->url() . '#tab-sources']) ?>
52 …<?php if (preg_match_all('/\n(2 SOUR\b.*(?:\n[^2].*)*)/', $fact->gedcom(), $matches, PREG_SET_ORDE…
54 …ew('fact-gedcom-fields', ['gedcom' => $match[1], 'parent' => $fact->tag(), 'tree' => $fact->record…
/webtrees/resources/css/
H A Dxenea.css519 * +--- wt-chart-box-fact
818 .wt-associate-fact,
819 .wt-relation-fact,
820 .wt-historic-fact {
1223 .wt-fact-icon {
1229 .wt-fact-icon-ADDR {
1233 .wt-fact-icon-ADOP {
1237 .wt-fact-icon-AFN,
1238 .wt-fact-icon-REFN,
1239 .wt-fact-icon-RFN,
[all …]
/webtrees/tests/app/Module/
H A DMapLinkOpenStreetMapTest.php37 $fact = $this->createMock(Fact::class);
38 $fact->method('latitude')->willReturn(null);
39 $fact->method('longitude')->willReturn(null);
41 $html = $module->mapLink($fact);
53 $fact = $this->createMock(Fact::class);
54 $fact->method('latitude')->willReturn(54.321);
55 $fact->method('longitude')->willReturn(-1.2345);
56 $fact->method('label')->willReturn('LABEL');
57 $fact->method('record')->willReturn($record);
59 $html = $module->mapLink($fact);
H A DMapLinkGoogleTest.php37 $fact = $this->createMock(Fact::class);
38 $fact->method('latitude')->willReturn(null);
39 $fact->method('longitude')->willReturn(null);
41 $html = $module->mapLink($fact);
53 $fact = $this->createMock(Fact::class);
54 $fact->method('latitude')->willReturn(54.321);
55 $fact->method('longitude')->willReturn(-1.2345);
56 $fact->method('label')->willReturn('LABEL');
57 $fact->method('record')->willReturn($record);
59 $html = $module->mapLink($fact);

1234567891011