Home
last modified time | relevance | path

Searched refs:tag (Results 1 – 25 of 163) sorted by relevance

1234567

/webtrees/app/Services/
H A DGedcomEditService.php73 ->filter(static fn (string $tag): bool => $tag !== '');
74 $facts = $tags->map(fn (string $tag): Fact => $this->createNewFact($dummy, $tag));
90 ->filter(static fn (string $tag): bool => $tag !== '');
91 $facts = $tags->map(fn (string $tag): Fact => $this->createNewFact($dummy, $tag));
100 * @param string $tag
104 private function createNewFact(GedcomRecord $record, string $tag): Fact argument
106 $element = Registry::elementFactory()->make($record->tag() . ':' . $tag);
108 $gedcom = trim('1 ' . $tag . ' ' . $default);
200 …return $this->insertMissingLevels($fact->record()->tree(), $fact->tag(), $gedcom, $include_hidden);
216 … $gedcom = $this->insertMissingLevels($record->tree(), $record->tag(), $gedcom, $include_hidden);
[all …]
H A DGedcomService.php164 * @param string $tag
168 public function canonicalTag(string $tag): string argument
170 $tag = strtoupper($tag);
172 $tag = self::TAG_NAMES[$tag] ?? self::TAG_SYNONYMS[$tag] ?? $tag;
174 return $tag;
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()));
515 …$facts[] = $this->convertEvent($fact, $birth_of_a_grandchild1[$fact->tag()], $fact->record()->sex(…
518 …$facts[] = $this->convertEvent($fact, $birth_of_a_grandchild2[$fact->tag()], $fact->record()->sex(…
521 …$facts[] = $this->convertEvent($fact, $birth_of_a_grandchild[$fact->tag()], $fact->record()->sex()…
526 … $facts[] = $this->convertEvent($fact, $birth_of_a_sibling[$fact->tag()], $fact->record()->sex());
529 …$facts[] = $this->convertEvent($fact, $birth_of_a_half_sibling[$fact->tag()], $fact->record()->sex…
532 … $facts[] = $this->convertEvent($fact, $birth_of_a_child[$fact->tag()], $fact->record()->sex());
546 …$facts[] = $this->convertEvent($fact, $death_of_a_grandchild1[$fact->tag()], $fact->record()->sex(…
549 …$facts[] = $this->convertEvent($fact, $death_of_a_grandchild2[$fact->tag()], $fact->record()->sex(…
[all …]
H A DGedcomImportService.php93 [, $level, $xref, $tag, $data] = $match;
95 $tag = $gedcom_service->canonicalTag($tag);
97 switch ($tag) {
188 switch ($tag) {
196 …$level . ' ' . ($level === '0' && $xref ? $xref . ' ' : '') . $tag . ($data === '' && $tag !== 'NO…
202 …$level . ' ' . ($level === '0' && $xref ? $xref . ' ' : '') . $tag . ($data === '' && $tag !== 'NO…
213 …$level . ' ' . ($level === '0' && $xref ? $xref . ' ' : '') . $tag . ($data === '' && $tag !== 'NO…
H A DClipboardService.php48 $record_type = $fact->record()->tag();
74 $record_type = $record->tag();
106 $facts = $clipboard[$record->tag()] ?? [];
131 … ->filter(static fn (Fact $fact): bool => $types->contains(explode(':', $fact->tag())[1]));
/webtrees/app/
H A DFact.php156 private string $tag; variable in Fisharebest\\Webtrees\\Fact
190 $this->tag = $match[1];
204 if (preg_match('/^1 ' . $this->tag . ' ?(.*(?:\n2 CONT ?.*)*)/', $this->gedcom, $match)) {
207 return Registry::elementFactory()->make($this->tag())->canonical($value);
226 switch ($this->tag) {
264 * @param string $tag
268 public function attribute(string $tag): string argument
270 if (preg_match('/\n2 ' . $tag . '\b ?(.*(?:(?:\n3 CONT ?.*)*)*)/', $this->gedcom, $match)) {
273 return Registry::elementFactory()->make($this->tag() . ':' . $tag)->canonical($value);
337 if ($target instanceof GedcomRecord && $target->tag() === $this->tag) {
[all …]
H A DGedcomRecord.php164 public function tag(): string function in Fisharebest\\Webtrees\\GedcomRecord
625 $filter = array_map(fn (string $tag): string => $this->tag() . ':' . $tag, $filter);
630 … if (($filter === [] || in_array($fact->tag(), $filter, true)) && $fact->canShow($access_level)) {
637 switch ($this->tag()) {
644 $subtags = Registry::elementFactory()->make($this->tag())->subtags();
645 … $subtags = array_map(fn (string $tag): string => $this->tag() . ':' . $tag, array_keys($subtags));
654 $sort_x = array_search($x->tag(), $subtags, true) ?: PHP_INT_MAX;
655 $sort_y = array_search($y->tag(), $subtags, true) ?: PHP_INT_MAX;
677 foreach (Registry::elementFactory()->make($this->tag())->subtags() as $subtag => $repeat) {
683 … $missing_facts[$subtag] = Registry::elementFactory()->make($this->tag() . ':' . $subtag)->label();
[all …]
/webtrees/app/Report/
H A DReportParserGenerate.php219 … * @param string $tag a gedcom tag or string to search for in the record (ie 1 BIRT or 2 DATE)
228 … public static function getSubRecord(int $level, string $tag, string $gedrec, int $num = 1): string argument
235 $tag = trim($tag);
236 $searchTarget = "~[\n]" . $tag . "[\s]~";
693 $tag = $attrs['id'];
694 $tag = str_replace('@fact', $this->fact, $tag);
695 $tags = explode(':', $tag);
704 foreach ($tags as $tag) {
705 if (preg_match('/\$(.+)/', $tag, $match)) {
713 if (preg_match('/@(.+)/', $tag, $match)) {
[all …]
/webtrees/resources/views/
H A Dfact.phtml29 [, $tag] = explode(':', $fact->tag());
35 $element = Registry::elementFactory()->make($fact->tag());
47 if ($tag === 'EVEN' && $value === 'CLOSE_RELATIVE') {
68 if ($tag === 'MARR') {
78 …<?php if ($id !== 'histo' && $id !== 'asso' && $fact->canEdit() && !in_array($tag, ['HUSB', 'WIFE'…
83 … <span class="wt-fact-icon wt-fact-icon-<?= e($tag) ?>" title="<?= strip_tags($label) ?>"></span>
100 …gedcom-fields', ['gedcom' => $note->gedcom(), 'parent' => $fact->target()->tag(), 'tree' => $fact-…
134 <?php if ($type !== '' && $tag !== 'EVEN' && $tag !== 'FACT') : ?>
136 …<?= Registry::elementFactory()->make($fact->tag() . ':TYPE')->labelValue(I18N::translate($type), $…
148 …<?= view('fact-gedcom-fields', ['gedcom' => $match[0], 'parent' => $fact->tag() . ':' . $match[1],…
H A Dfact-date.phtml28 …$fact_age = Registry::elementFactory()->make($fact->tag() . ':AGE')->value($match[1], $record->tre…
34 …$husb_age = Registry::elementFactory()->make($fact->tag() . ':HUSB:AGE')->value($match[1], $record…
40 …$wife_age = Registry::elementFactory()->make($fact->tag() . ':WIFE:AGE')->value($match[1], $record…
46 [, $tag] = explode(':', $fact->tag());
58 in_array($tag, Gedcom::BIRTH_EVENTS, true) &&
66 …if ($tag !== 'BIRT' && Registry::elementFactory()->make($fact->tag()) instanceof AbstractEventElem…
80 if ($tag === 'DEAT' || Date::compare($date, $death_date) <= 0 || !$record->isDead()) {
110 if ($tag !== 'DEAT' && $death_date->isOK() && Date::compare($death_date, $date) <= 0) {
H A Dindividual-page-name.phtml47 …<?= Registry::elementFactory()->make($fact->tag() . ':TYPE')->value($fact->attribute('TYPE'), $tre…
61 <?php [, $tag, $value] = $match ?>
62 <?php $element = Registry::elementFactory()->make($fact->tag() . ':' . $tag) ?>
63 <?php if ($tag !== 'SOUR' && $tag !== 'NOTE') : ?>
H A Dchart-box.phtml92 return !in_array($fact->tag(), $exclude, true);
172 foreach ($opt_tags as $key => $tag) {
173 if (!in_array($tag, Gedcom::DEATH_EVENTS, true)) {
174 $event = $individual->facts([$tag])->first();
193 foreach ($opt_tags as $tag) {
194 $event = $individual->facts([$tag])->first();
H A Dfact-add-new.phtml23 switch ($record->tag()) {
80 $filter_fn = static fn (string $tag): bool => !in_array($tag, $unique_facts, true) || $record->fact…
86 $label_fn = static fn (string $subtag): string => Registry::elementFactory()->make($record->tag() .…
H A Dfact-place.phtml43 …<?= view('fact-gedcom-fields', ['gedcom' => $match[1], 'parent' => $fact->tag() . ':PLAC:NOTE', 't…
49 …<?= Registry::elementFactory()->make($fact->tag() . ':TEMP')->labelValue($match[1], $record->tree(…
53 …<?= Registry::elementFactory()->make($fact->tag() . ':STAT')->labelValue($match[1], $record->tree(…
56 …<?= Registry::elementFactory()->make($fact->tag() . ':STAT:DATE')->labelValue((new Date($match[1])…
/webtrees/app/Factories/
H A DElementFactory.php41 * @param string $tag Colon delimited hierarchy, e.g. 'INDI:BIRT:PLAC'
45 public function make(string $tag): ElementInterface argument
47 … return $this->elements[$tag] ?? $this->findElementByWildcard($tag) ?? new UnknownElement($tag);
67 foreach ($subtags as $tag => $children) {
69 $this->make($tag)->subtag(...$child);
74 private function findElementByWildcard(string $tag): ElementInterface|null argument
80 if (preg_match($regex, $tag)) {
/webtrees/resources/views/admin/
H A Dtrees-check.phtml32 <li class="list-group-item list-group-item-danger" data-wt-tag="<?= e($error->tag) ?>">
36 <?php if ($error->tag !== '') : ?>
39 <?= I18N::translate('Hide these errors') ?> — <?= e($error->tag) ?>
48 <li class="list-group-item list-group-item-warning" data-wt-tag="<?= e($warning->tag) ?>">
52 <?php if ($warning->tag !== '') : ?>
55 <?= I18N::translate('Hide these errors') ?> — <?= e($warning->tag) ?>
64 <li class="list-group-item list-group-item-info" data-wt-tag="<?= e($info->tag) ?>">
68 <?php if ($info->tag !== '') : ?>
71 <?= I18N::translate('Hide these errors') ?> — <?= e($info->tag) ?>
/webtrees/resources/views/modules/recent_changes/
H A Dchanges-table.phtml59 … <td data-sort="<?= $row->record->tag() ?>" class="text-centre wt-side-block-optional">
60 <?php if ($row->record->tag() === Individual::RECORD_TYPE) : ?>
63 <?php elseif ($row->record->tag() === Family::RECORD_TYPE) : ?>
66 <?php elseif ($row->record->tag() === Media::RECORD_TYPE) : ?>
69 <?php elseif ($row->record->tag() === Note::RECORD_TYPE) : ?>
72 <?php elseif ($row->record->tag() === Source::RECORD_TYPE) : ?>
75 <?php elseif ($row->record->tag() === Submitter::RECORD_TYPE) : ?>
78 <?php elseif ($row->record->tag() === Repository::RECORD_TYPE) : ?>
81 <?php elseif ($row->record->tag() === Location::RECORD_TYPE) : ?>
/webtrees/resources/views/icons/
H A Drecord.phtml19 if ($record->tag() === Individual::RECORD_TYPE) : ?>
21 <?php elseif ($record->tag() === Family::RECORD_TYPE) : ?>
23 <?php elseif ($record->tag() === Source::RECORD_TYPE) : ?>
25 <?php elseif ($record->tag() === Repository::RECORD_TYPE) : ?>
27 <?php elseif ($record->tag() === Note::RECORD_TYPE) : ?>
29 <?php elseif ($record->tag() === Media::RECORD_TYPE) : ?>
31 <?php elseif ($record->tag() === Submitter::RECORD_TYPE) : ?>
33 <?php elseif ($record->tag() === Location::RECORD_TYPE) : ?>
/webtrees/app/Http/RequestHandlers/
H A DSiteTagsPage.php57 …static fn (string $tag): array => [$tag => Registry::elementFactory()->make('FAM:' . $tag)->label(…
61 …static fn (string $tag): array => [$tag => Registry::elementFactory()->make('INDI:' . $tag)->label…
H A DRenumberTreeAction.php103 foreach (['CHIL', 'ASSO', '_ASSO'] as $tag) {
111 ->where('l_type', '=', $tag)
114 … 'f_gedcom' => new Expression("REPLACE(f_gedcom, ' $tag @$old_xref@', ' $tag @$new_xref@')"),
119 foreach (['ALIA', 'ASSO', '_ASSO'] as $tag) {
127 ->where('link.l_type', '=', $tag)
130 … 'i_gedcom' => new Expression("REPLACE(i_gedcom, ' $tag @$old_xref@', ' $tag @$new_xref@')"),
167 foreach (['FAMC', 'FAMS'] as $tag) {
175 ->where('l_type', '=', $tag)
178 … 'i_gedcom' => new Expression("REPLACE(i_gedcom, ' $tag @$old_xref@', ' $tag @$new_xref@')"),
H A DCheckTree.php202 $tag = $match[2];
204 $hierarchy[$level] = $tag;
209 if ($tag === 'CONT') {
214 …if (str_starts_with($tag, '_') || str_starts_with($full_tag, '_') || str_contains($full_tag, ':_')…
229 …lineError($tree, $record->type, $record->xref, $line_number, $line, $message, $tag . '-' . $xref1);
279 …lineError($tree, $record->type, $record->xref, $line_number, $line, $message, $tag . '-' . $xref1);
281 } elseif ($tag === 'SOUR') {
404 * @param string $tag
415 string $tag argument
427 'tag' => $tag,
[all …]
H A DReorderFamiliesAction.php60 $tag = $fact->tag();
62 if ($tag === 'INDI:FAMC' || $tag === 'INDI:FAMS') {
H A DMergeFactsPage.php62 $record1->tag() !== $record2->tag() ||
81 if (!$fact->isPendingDeletion() && !str_ends_with($fact->tag(), ':CHAN')) {
87 if (!$fact->isPendingDeletion() && !str_ends_with($fact->tag(), ':CHAN')) {
/webtrees/app/Elements/
H A DEventsRecorded.php128 …->mapWithKeys(static fn (string $tag): array => [explode(':', $tag)[1] => $factory->make($tag)->la…
160 $events = array_map(static function (string $tag): string {
162 $element = Registry::elementFactory()->make($record_type . ':' . $tag);
169 return e($tag);
/webtrees/tests/
H A DTestCase.php246 $tag = $match[1];
249 $message = 'Tag ' . $tag . ' is not allowed at ' . implode(':', $stack) . '.';
251 switch ($tag) {
265 $stack[] = $tag;
268 if ($tag === 'script' && !$self_closing) {

1234567