/webtrees/app/Services/ |
H A D | LinkedRecordService.php | 48 * @param GedcomRecord $record 52 public function allLinkedRecords(GedcomRecord $record): Collection argument 54 $like = addcslashes($record->xref(), '\\%_'); 57 ->where('gedcom_id', '=', $record->tree()->id()) 60 ->whereIn('change_id', function (Builder $query) use ($record): void { 64 ->where('gedcom_id', '=', $record->tree()->id()) 71 ->where('l_file', '=', $record->tree()->id()) 72 ->where('l_to', '=', $record->xref()) 77 …fs->map(static fn (string $xref) => Registry::gedcomRecordFactory()->make($xref, $record->tree())); 83 * @param GedcomRecord $record [all …]
|
H A D | PendingChangesService.php | 123 $row->record = $factory->new($row->xref, $row->old_gedcom, $row->new_gedcom, $tree); 171 * @param GedcomRecord $record 173 public function acceptRecord(GedcomRecord $record): void argument 176 ->where('gedcom_id', '=', $record->tree()->id()) 177 ->where('xref', '=', $record->xref()) 186 … $this->gedcom_import_service->updateRecord($change->old_gedcom, $record->tree(), true); 189 … $this->gedcom_import_service->updateRecord($change->new_gedcom, $record->tree(), false); 201 * @param GedcomRecord $record 204 public function acceptChange(GedcomRecord $record, string $change_id): void argument 207 ->where('gedcom_id', '=', $record->tree()->id()) [all …]
|
H A D | CalendarService.php | 162 $record = Registry::individualFactory()->make($row->xref, $tree, $row->gedcom); 163 assert($record instanceof Individual); 165 if ($filterof === 'living' && $record->isDead()) { 169 $record = Registry::familyFactory()->make($row->xref, $tree, $row->gedcom); 170 assert($record instanceof Family); 171 $husb = $record->husband(); 172 $wife = $record->wife(); 181 foreach ($record->facts([$row->d_fact]) as $fact) { 216 $record = $fact->record(); 219 if ($record instanceof Individual && $record->isDead()) { [all …]
|
/webtrees/app/Http/RequestHandlers/ |
H A D | CheckTree.php | 173 foreach ($records as $record) { 175 if ($skip_to === $record->xref) { 180 $skip_to = $record->xref; 184 $lines = explode("\n", $record->gedcom); 188 $hierarchy = [$record->type]; 192 …$errors[] = $this->lineError($tree, $record->type, $record->xref, $line_number, $line, I18N::trans… 198 …$errors[] = $this->lineError($tree, $record->type, $record->xref, $line_number, $line, I18N::trans… 216 …$warnings[] = $this->lineError($tree, $record->type, $record->xref, $line_number, $line, $message,… 219 …$errors[] = $this->lineError($tree, $record->type, $record->xref, $line_number, $line, $message, $… 229 …$errors[] = $this->lineError($tree, $record->type, $record->xref, $line_number, $line, $message, $… [all …]
|
H A D | GedcomRecordPage.php | 92 $record = Registry::gedcomRecordFactory()->make($xref, $tree); 93 $record = Auth::checkRecordAccess($record); 96 … if ($record->xref() !== $xref || in_array(get_class($record), self::STANDARD_RECORDS, true)) { 97 return redirect($record->url()); 100 $linked_families = $this->linked_record_service->linkedFamilies($record); 101 $linked_individuals = $this->linked_record_service->linkedIndividuals($record); 102 $linked_locations = $this->linked_record_service->linkedLocations($record); 103 $linked_media = $this->linked_record_service->linkedMedia($record); 104 $linked_notes = $this->linked_record_service->linkedNotes($record); 105 $linked_repositories = $this->linked_record_service->linkedRepositories($record); [all …]
|
H A D | NotePage.php | 66 $record = Registry::noteFactory()->make($xref, $tree); 67 $record = Auth::checkNoteAccess($record, false); 70 if ($record->xref() !== $xref || Registry::slugFactory()->make($record) !== $slug) { 71 return redirect($record->url(), StatusCodeInterface::STATUS_MOVED_PERMANENTLY); 74 $linked_families = $this->linked_record_service->linkedFamilies($record); 75 $linked_individuals = $this->linked_record_service->linkedIndividuals($record); 76 $linked_locations = $this->linked_record_service->linkedLocations($record); 77 $linked_media = $this->linked_record_service->linkedMedia($record); 78 $linked_repositories = $this->linked_record_service->linkedRepositories($record); 79 $linked_sources = $this->linked_record_service->linkedSources($record); [all …]
|
H A D | SharedNotePage.php | 66 $record = Registry::sharedNoteFactory()->make($xref, $tree); 67 $record = Auth::checkSharedNoteAccess($record, false); 70 if ($record->xref() !== $xref || Registry::slugFactory()->make($record) !== $slug) { 71 return redirect($record->url(), StatusCodeInterface::STATUS_MOVED_PERMANENTLY); 74 $linked_families = $this->linked_record_service->linkedFamilies($record); 75 $linked_individuals = $this->linked_record_service->linkedIndividuals($record); 76 $linked_locations = $this->linked_record_service->linkedLocations($record); 77 $linked_media = $this->linked_record_service->linkedMedia($record); 78 $linked_repositories = $this->linked_record_service->linkedRepositories($record); 79 $linked_sources = $this->linked_record_service->linkedSources($record); [all …]
|
H A D | MediaPage.php | 66 $record = Registry::mediaFactory()->make($xref, $tree); 67 $record = Auth::checkMediaAccess($record); 70 if ($record->xref() !== $xref || Registry::slugFactory()->make($record) !== $slug) { 71 return redirect($record->url(), StatusCodeInterface::STATUS_MOVED_PERMANENTLY); 74 $linked_families = $this->linked_record_service->linkedFamilies($record); 75 $linked_individuals = $this->linked_record_service->linkedIndividuals($record); 76 $linked_locations = $this->linked_record_service->linkedLocations($record); 77 $linked_notes = $this->linked_record_service->linkedNotes($record); 78 $linked_sources = $this->linked_record_service->linkedSources($record); 81 'clipboard_facts' => $this->clipboard_service->pastableFacts($record), [all …]
|
H A D | SourcePage.php | 66 $record = Registry::sourceFactory()->make($xref, $tree); 67 $record = Auth::checkSourceAccess($record, false); 70 if ($record->xref() !== $xref || Registry::slugFactory()->make($record) !== $slug) { 71 return redirect($record->url(), StatusCodeInterface::STATUS_MOVED_PERMANENTLY); 74 $linked_locations = $this->linked_record_service->linkedLocations($record); 77 'clipboard_facts' => $this->clipboard_service->pastableFacts($record), 78 'linked_families' => $this->linked_record_service->linkedFamilies($record), 79 'linked_individuals' => $this->linked_record_service->linkedIndividuals($record), 81 'linked_media_objects' => $this->linked_record_service->linkedMedia($record), 82 'linked_notes' => $this->linked_record_service->linkedNotes($record), [all …]
|
/webtrees/resources/views/ |
H A D | individual-page-menu.phtml | 43 …-item" href="<?= e(route(AddNewFact::class, ['tree' => $record->tree()->name(), 'xref' => $record-… 48 <?php if ($record->facts(['NAME'], false, null, true)->count() > 1) : ?> 49 … href="<?= e(route(ReorderNamesPage::class, ['tree' => $record->tree()->name(), 'xref' => $record-… 62 <?php if ($record->facts(['SEX'], false, null, true)->isEmpty()) : ?> 63 …e(route(AddNewFact::class, ['fact' => 'SEX', 'tree' => $record->tree()->name(), 'xref' => $record-… 69 <?php foreach ($record->facts(['SEX'], false, null, true) as $fact) : ?> 71 …="<?= e(route(EditFactPage::class, ['xref' => $record->xref(), 'fact_id' => $fact->id(), 'tree' =>… 80 … <?php if ($record->spouseFamilies()->count() > 1 || $record->childFamilies()->count() > 1) : ?> 81 …ef="<?= e(route(ReorderFamiliesPage::class, ['tree' => $record->tree()->name(), 'xref' => $record-… 95 …-item" href="<?= e(route(AddNewFact::class, ['tree' => $record->tree()->name(), 'xref' => $record-… [all …]
|
H A D | family-page-menu.phtml | 33 …<?= e(route(ChangeFamilyMembersPage::class, ['tree' => $record->tree()->name(), 'xref' => $record-… 38 <?php if ($record->husband() === null) : ?> 39 …="<?= e(route(AddSpouseToFamilyPage::class, ['tree' => $record->tree()->name(), 'xref' => $record-… 45 <?php if ($record->wife() === null) : ?> 46 …="<?= e(route(AddSpouseToFamilyPage::class, ['tree' => $record->tree()->name(), 'xref' => $record-… 52 …f="<?= e(route(AddChildToFamilyPage::class, ['tree' => $record->tree()->name(), 'xref' => $record-… 57 <?php if ($record->numberOfChildren() > 1) : ?> 58 …ef="<?= e(route(ReorderChildrenPage::class, ['tree' => $record->tree()->name(), 'xref' => $record-… 67 …-item" href="<?= e(route(AddNewFact::class, ['tree' => $record->tree()->name(), 'xref' => $record-… 76 …view('record-page-menu-clipboard', ['clipboard_facts' => $clipboard_facts, 'record' => $record]) ?> [all …]
|
H A D | media-page-menu.phtml | 32 …href="<?= e(route(AddMediaFileModal::class, ['tree' => $record->tree()->name(), 'xref' => $record-… 37 <?php if ($record->mediaFiles()->count() >= 2) : ?> 38 …" href="<?= route(ReorderMediaFilesPage::class, ['xref' => $record->xref(), 'tree' => $record->tre… 44 <?php if ($record->missingFacts() !== []) : ?> 47 <?= view('record-page-menu-facts', ['record' => $record]) ?> 53 …view('record-page-menu-clipboard', ['clipboard_facts' => $clipboard_facts, 'record' => $record]) ?> 58 … e(route(LinkMediaToIndividualModal::class, ['tree' => $record->tree()->name(), 'xref' => $record-… 63 …"<?= e(route(LinkMediaToFamilyModal::class, ['tree' => $record->tree()->name(), 'xref' => $record-… 68 …"<?= e(route(LinkMediaToSourceModal::class, ['tree' => $record->tree()->name(), 'xref' => $record-… 73 <?php if (Auth::isManager($record->tree())) : ?> [all …]
|
H A D | media-page-details.phtml | 24 <?php foreach ($record->mediaFiles() as $media_file) : ?> 28 <?php if ($record->canEdit() && !$media_file->isPendingDeletion()) : ?> 30 …-href="<?= route(EditMediaFileModal::class, ['tree' => $record->tree()->name(), 'xref' => $record-… 37 <?php if (count($record->mediaFiles()) > 1) : ?> 38 …wt-post-url="<?= e(route(DeleteFact::class, ['tree' => $record->tree()->name(), 'xref' => $record-… 52 …istry::elementFactory()->make('OBJE:FILE')->labelValue($media_file->filename(), $record->tree()) ?> 53 <?php elseif (Auth::isEditor($record->tree())) :?> 59 …istry::elementFactory()->make('OBJE:FILE')->labelValue($media_file->filename(), $record->tree()) ?> 62 …try::elementFactory()->make('OBJE:FILE:TITL')->labelValue($media_file->title(), $record->tree()) ?> 63 …:elementFactory()->make('OBJE:FILE:FORM:TYPE')->labelValue($media_file->type(), $record->tree()) ?> [all …]
|
H A D | record-page-pending.phtml | 17 <?php if ($record->isPendingDeletion()) : ?> 18 <?php if (Auth::isModerator($record->tree())) : ?> 19 …record->tree()->name(), 'xref' => $record->xref()])) . '">' . I18N::translateContext('You should r… 20 <?php elseif (Auth::isEditor($record->tree())) : ?> 23 <?php elseif ($record->isPendingAddition()) : ?> 24 <?php if (Auth::isModerator($record->tree())) : ?> 25 …record->tree()->name(), 'xref' => $record->xref()])) . '">' . I18N::translateContext('You should r… 26 <?php elseif (Auth::isEditor($record->tree())) : ?>
|
H A D | media-page-pending.phtml | 16 <?php if ($record->isPendingDeletion()) : ?> 17 <?php if (Auth::isModerator($record->tree())) : ?> 18 …record->tree()->name(), 'xref' => $record->xref()])) . '">' . I18N::translateContext('You should r… 19 <?php elseif (Auth::isEditor($record->tree())) : ?> 22 <?php elseif ($record->isPendingAddition()) : ?> 23 <?php if (Auth::isModerator($record->tree())) : ?> 24 …record->tree()->name(), 'xref' => $record->xref()])) . '">' . I18N::translateContext('You should r… 25 <?php elseif (Auth::isEditor($record->tree())) : ?>
|
H A D | individual-page-pending.phtml | 16 <?php if ($record->isPendingDeletion()) : ?> 17 <?php if (Auth::isModerator($record->tree())) : ?> 20 …record->tree()->name(), 'xref' => $record->xref()])) . '">' . I18N::translateContext('You should r… 22 <?php elseif (Auth::isEditor($record->tree())) : ?> 25 <?php elseif ($record->isPendingAddition()) : ?> 26 <?php if (Auth::isModerator($record->tree())) : ?> 29 …record->tree()->name(), 'xref' => $record->xref()])) . '">' . I18N::translateContext('You should r… 31 <?php elseif (Auth::isEditor($record->tree())) : ?>
|
H A D | note-page-pending.phtml | 17 <?php if ($record->isPendingDeletion()) : ?> 18 <?php if (Auth::isModerator($record->tree())) : ?> 19 …record->tree()->name(), 'xref' => $record->xref()])) . '">' . I18N::translateContext('You should r… 20 <?php elseif (Auth::isEditor($record->tree())) : ?> 23 <?php elseif ($record->isPendingAddition()) : ?> 24 <?php if (Auth::isModerator($record->tree())) : ?> 25 …record->tree()->name(), 'xref' => $record->xref()])) . '">' . I18N::translateContext('You should r… 26 <?php elseif (Auth::isEditor($record->tree())) : ?>
|
H A D | family-page-pending.phtml | 17 <?php if ($record->isPendingDeletion()) : ?> 18 <?php if (Auth::isModerator($record->tree())) : ?> 19 …record->tree()->name(), 'xref' => $record->xref()])) . '">' . I18N::translateContext('You should r… 20 <?php elseif (Auth::isEditor($record->tree())) : ?> 23 <?php elseif ($record->isPendingAddition()) : ?> 24 <?php if (Auth::isModerator($record->tree())) : ?> 25 …record->tree()->name(), 'xref' => $record->xref()])) . '">' . I18N::translateContext('You should r… 26 <?php elseif (Auth::isEditor($record->tree())) : ?>
|
H A D | fact-date.phtml | 28 …$fact_age = Registry::elementFactory()->make($fact->tag() . ':AGE')->value($match[1], $record->tre… 34 … = Registry::elementFactory()->make($fact->tag() . ':HUSB:AGE')->value($match[1], $record->tree()); 40 … = Registry::elementFactory()->make($fact->tag() . ':WIFE:AGE')->value($match[1], $record->tree()); 50 $html .= ' ' . $date->display($cal_link ? $record->tree() : null, null, true); 56 if ($record instanceof Individual) { 59 $record === $fact->record() && 60 $record->tree()->getPreference('SHOW_PARENTS_AGE') === '1' 63 $html .= view('fact-parents-age', ['individual' => $record, 'birth_date' => $date]); 68 $birth_date = $record->getBirthDate(); 72 $death_event = $record->facts(['DEAT'])->first(); [all …]
|
/webtrees/app/ |
H A D | Fact.php | 150 private GedcomRecord $record; variable in Fisharebest\\Webtrees\\Fact 188 $this->record = $parent; 229 return Registry::familyFactory()->make($xref, $this->record->tree()); 235 return Registry::individualFactory()->make($xref, $this->record->tree()); 238 Registry::individualFactory()->make($xref, $this->record->tree()) ?? 239 Registry::submitterFactory()->make($xref, $this->record->tree()); 241 return Registry::sourceFactory()->make($xref, $this->record->tree()); 243 return Registry::mediaFactory()->make($xref, $this->record->tree()); 245 return Registry::repositoryFactory()->make($xref, $this->record->tree()); 247 return Registry::noteFactory()->make($xref, $this->record->tree()); [all …]
|
/webtrees/app/Module/ |
H A D | FixWtObjeSortTag.php | 91 * @param GedcomRecord $record 96 public function doesRecordNeedUpdate(GedcomRecord $record, array $params): bool argument 98 …return str_contains($record->gedcom(), "\n1 _WT_OBJE_SORT ") || str_contains($record->gedcom(), "\… 104 * @param GedcomRecord $record 109 public function previewUpdate(GedcomRecord $record, array $params): string argument 111 $old = $record->gedcom(); 112 $new = $this->reorderMediaLinks($record); 114 return $this->data_fix_service->gedcomDiff($record->tree(), $old, $new); 120 * @param GedcomRecord $record 125 public function updateRecord(GedcomRecord $record, array $params): void argument [all …]
|
H A D | FixMissingDeaths.php | 87 * @param GedcomRecord $record 92 public function doesRecordNeedUpdate(GedcomRecord $record, array $params): bool argument 95 $record instanceof Individual && 96 $record->facts(Gedcom::DEATH_EVENTS, false, null, true)->isEmpty() && 97 $record->isDead(); 103 * @param GedcomRecord $record 108 public function previewUpdate(GedcomRecord $record, array $params): string argument 110 $old = $record->gedcom(); 111 $new = $this->updateGedcom($record); 113 return $this->data_fix_service->gedcomDiff($record->tree(), $old, $new); [all …]
|
H A D | FixNameSlashesAndSpaces.php | 84 * @param GedcomRecord $record 89 public function doesRecordNeedUpdate(GedcomRecord $record, array $params): bool argument 91 $gedcom = $record->gedcom(); 101 * @param GedcomRecord $record 106 public function previewUpdate(GedcomRecord $record, array $params): string argument 108 $old = $record->gedcom(); 109 $new = $this->updateGedcom($record); 111 return $this->data_fix_service->gedcomDiff($record->tree(), $old, $new); 117 * @param GedcomRecord $record 122 public function updateRecord(GedcomRecord $record, array $params): void argument [all …]
|
H A D | ShareAnniversaryModule.php | 84 * @param GedcomRecord $record 88 public function share(GedcomRecord $record): string argument 90 if ($record instanceof Individual) { 91 $facts = $record->facts(static::INDIVIDUAL_EVENTS, true) 92 …->merge($record->spouseFamilies()->map(fn (Family $family): Collection => $family->facts(static::F… 93 } elseif ($record instanceof Family) { 94 $facts = $record->facts(static::FAMILY_EVENTS, true); 107 …route(static::class, ['tree' => $record->tree()->name(), 'xref' => $fact->record()->xref(), 'fact_… 112 … $url = route(static::class, ['tree' => $record->tree()->name(), 'xref' => $record->xref()]); 116 'record' => $record, [all …]
|
H A D | FixPlaceNames.php | 128 * @param GedcomRecord $record 133 public function doesRecordNeedUpdate(GedcomRecord $record, array $params): bool argument 138 return preg_match($regex, $record->gedcom()) === 1; 144 * @param GedcomRecord $record 149 public function previewUpdate(GedcomRecord $record, array $params): string argument 151 $old = $record->gedcom(); 152 $new = $this->updateGedcom($record, $params); 154 return $this->data_fix_service->gedcomDiff($record->tree(), $old, $new); 160 * @param GedcomRecord $record 165 public function updateRecord(GedcomRecord $record, array $params): void argument [all …]
|