/webtrees/app/ |
H A D | Validator.php | 62 $check_utf8 = static function ($value, $key): void { 66 if (is_string($value) && preg_match('//u', $value) !== 1) { 128 $this->rules[] = static function (int|null $value) use ($minimum, $maximum): int|null { 129 if (is_int($value) && $value >= $minimum && $value <= $maximum) { 130 return $value; 146 …his->rules[] = static fn (int|string|null $value): int|string|null => in_array($value, $values, tr… 166 …$this->rules[] = static fn (string|null $value): string|null => $value !== null && $value !== '' ?… 178 $this->rules[] = static function (string|null $value) use ($base_url): string|null { 179 if ($value !== null) { 180 $value_info = parse_url($value); [all …]
|
H A D | Fact.php | 202 public function value(): string function in Fisharebest\\Webtrees\\Fact 205 $value = preg_replace("/\n2 CONT ?/", "\n", $match[1]); 207 return Registry::elementFactory()->make($this->tag())->canonical($value); 220 if (!preg_match('/^@(' . Gedcom::REGEX_XREF . ')@$/', $this->value(), $match)) { 271 $value = preg_replace("/\n3 CONT ?/", "\n", $match[1]); 273 return Registry::elementFactory()->make($this->tag() . ':' . $tag)->canonical($value); 448 …ds_with($this->tag(), ':NOTE') && preg_match('/^@' . Gedcom::REGEX_XREF . '@$/', $this->value())) { 458 return $element->value($type, $this->record->tree()); 538 $value = $this->value(); 539 if ($value !== '' && $value !== 'Y') { [all …]
|
/webtrees/app/Elements/ |
H A D | AbstractElement.php | 90 * @param string $value 94 public function canonical(string $value): string argument 96 $value = strtr($value, self::WHITESPACE_LINE); 98 while (str_contains($value, ' ')) { 99 $value = strtr($value, [' ' => ' ']); 102 return trim($value); 108 * @param string $value 112 protected function canonicalText(string $value): string argument 114 $value = strtr($value, self::WHITESPACE_TEXT); 116 return trim($value, "\n"); [all …]
|
H A D | NoteStructure.php | 44 * @param string $value 49 public function edit(string $id, string $name, string $value, Tree $tree): string argument 55 if (preg_match('/^@' . Gedcom::REGEX_XREF . '@$/', $value)) { 56 return $xref_note->edit($id, $name, $value, $tree); 60 if ($value !== '') { 61 return $submitter_text->edit($id, $name, $value, $tree); 76 $submitter_text->edit($id, $name, $value, $tree) . 79 $xref_note->edit($id . '-select', $name, $value, $tree) . 99 * @param string $value 104 public function labelValue(string $value, Tree $tree): string argument [all …]
|
H A D | AbstractEventElement.php | 35 * @param string $value 39 public function canonical(string $value): string argument 41 $value = parent::canonical($value); 43 if ($value === 'y') { 47 return $value; 55 * @param string $value 60 public function edit(string $id, string $name, string $value, Tree $tree): string argument 64 $this->editHidden($id, $name, $value ? 'Y' : '') . 65 …rm-check-input" type="checkbox" value="Y" id="' . e($id) . '-check" ' . ($value ? 'checked="checke… 80 * @param string $value [all …]
|
H A D | PlaceName.php | 50 * @param string $value 54 public function canonical(string $value): string argument 56 $value = parent::canonical($value); 59 $value = strtr($value, ['،' => ',', ',' => ',', '、' => ',']); 62 $value = strtr($value, [' ,' => ',']); 65 $value = strtr($value, [',' => ', ']); 66 $value = strtr($value, [', ' => ', ']); 68 return trim($value); 86 * @param string $value 91 public function edit(string $id, string $name, string $value, Tree $tree): string argument [all …]
|
H A D | EventsRecorded.php | 98 * @param string $value 102 public function canonical(string $value): string argument 104 $value = strtoupper(strtr(parent::canonical($value), [' ' => ','])); 106 while (str_contains($value, ',,')) { 107 $value = strtr($value, [',,' => ',']); 110 return trim($value, ','); 118 * @param string $value 123 public function edit(string $id, string $name, string $value, Tree $tree): string argument 135 … = '<input type="hidden" id="' . e($id) . '" name="' . e($name) . '" value="' . e($value) . '" />'; 144 'selected' => explode(',', strtr($value, [' ' => ''])), [all …]
|
H A D | MaidenheadLocator.php | 38 * @param string $value 42 public function canonical(string $value): string argument 44 $value = parent::canonical($value); 47 if (mb_strlen($value) >= 2) { 48 $value = mb_strtoupper(mb_substr($value, 0, 2)) . mb_substr($value, 2); 52 if (mb_strlen($value) >= 6) { 53 … $value = mb_substr($value, 0, 4) . mb_strtolower(mb_substr($value, 4, 2)) . mb_substr($value, 6); 56 return $value;
|
H A D | XrefMedia.php | 45 * @param string $value 50 public function edit(string $id, string $name, string $value, Tree $tree): string argument 55 'media' => Registry::mediaFactory()->make(trim($value, '@'), $tree), 72 * @param string $value 77 public function labelValue(string $value, Tree $tree): string argument 80 if (preg_match('/^@(' . Gedcom::REGEX_XREF . ')@$/', $value, $match) === 1) { 84 return parent::labelValue($value, $tree); 90 return parent::labelValue($value, $tree); 94 $value = '<a href="' . e($media->url()) . '">' . $media->fullName() . '</a>'; 97 $value_html = '<div class="wt-media-link-title">' . $value . '</div>'; [all …]
|
H A D | XrefSource.php | 55 * @param string $value 60 public function edit(string $id, string $name, string $value, Tree $tree): string argument 63 if ($value === '' || preg_match('/^@' . Gedcom::REGEX_XREF . '@$/', $value)) { 67 'source' => Registry::sourceFactory()->make(trim($value, '@'), $tree), 81 return $this->editTextArea($id, $name, $value); 87 * @param string $value 92 public function value(string $value, Tree $tree): string argument 94 if (str_starts_with($value, '@') && str_ends_with($value, '@')) { 95 return $this->valueXrefLink($value, $tree, Registry::sourceFactory()); 99 return $this->valueFormatted($value, $tree);
|
H A D | RoleInEvent.php | 45 * @param string $value 49 public function canonical(string $value): string argument 51 $value = parent::canonical($value); 52 $upper = strtoupper($value); 58 if (!str_starts_with($value, '(')) { 59 $value = '(' . $value; 62 if (!str_ends_with($value, ')')) { 63 return $value . ')'; 66 return $value;
|
H A D | DateValue.php | 51 * @param string $value 56 public function edit(string $id, string $name, string $value, Tree $tree): string argument 67 'value' => $value, 80 '<div class="form-text">' . (new Date($value))->display() . '</div>'; 86 * @param string $value 90 public function escape(string $value): string argument 93 …ck('/\(.*@.*\)/', static fn (array $matches): string => strtr($matches[0], ['@' => '@@']), $value); 99 * @param string $value 104 public function value(string $value, Tree $tree): string argument 106 $canonical = $this->canonical($value);
|
H A D | SourcePublicationFacts.php | 37 * @param string $value 41 public function canonical(string $value): string argument 43 return $this->canonicalText($value); 51 * @param string $value 56 public function edit(string $id, string $name, string $value, Tree $tree): string argument 58 return $this->editTextArea($id, $name, $value); 64 * @param string $value 69 public function value(string $value, Tree $tree): string function in Fisharebest\\Webtrees\\Elements\\SourcePublicationFacts 71 return $this->valueAutoLink($value);
|
H A D | SubmitterText.php | 33 * @param string $value 37 public function canonical(string $value): string argument 39 return $this->canonicalText($value); 47 * @param string $value 52 public function edit(string $id, string $name, string $value, Tree $tree): string argument 54 return $this->editTextArea($id, $name, $value); 60 * @param string $value 65 public function value(string $value, Tree $tree): string argument 67 return $this->valueFormatted($value, $tree);
|
H A D | TextFromSource.php | 38 * @param string $value 42 public function canonical(string $value): string argument 44 return $this->canonicalText($value); 52 * @param string $value 57 public function edit(string $id, string $name, string $value, Tree $tree): string argument 59 return $this->editTextArea($id, $name, $value); 65 * @param string $value 70 public function value(string $value, Tree $tree): string argument 72 return $this->valueFormatted($value, $tree);
|
H A D | MultimediaFileReference.php | 43 * @param string $value 47 public function canonical(string $value): string argument 50 return strtr($value, ["\t" => '', "\r" => '', "\n" => '']); 68 * @param string $value 73 public function edit(string $id, string $name, string $value, Tree $tree): string argument 78 …return parent::edit($id, $name, $value, $tree) . '<div class="alert alert-warning mb-0">' . $icon … 84 * @param string $value 89 public function value(string $value, Tree $tree): string argument 91 return $this->valueLink($value);
|
H A D | NamePersonal.php | 103 * @param string $value 107 public function canonical(string $value): string argument 109 $value = parent::canonical($value); 111 if ($value === '//') { 115 return $value; 137 * @param string $value 142 public function edit(string $id, string $name, string $value, Tree $tree): string argument 147 …"text" id="' . e($id) . '-disabled" name="' . e($name) . '" value="' . e($value) . '" readonly="re… 148 …rol d-none" type="text" id="' . e($id) . '" name="' . e($name) . '" value="' . e($value) . '" />' .
|
H A D | RestrictionNotice.php | 73 * @param string $value 77 public function canonical(string $value): string argument 79 $value = strtoupper(parent::canonical($value)); 80 $value = trim($value, ', '); 81 $value = preg_replace('/[, ]+/', ', ', $value); 83 return self::CANONICAL[$value] ?? $value;
|
H A D | AbstractXrefElement.php | 49 * @param string $value 53 public function escape(string $value): string argument 55 return $value; 61 * @param string $value 67 …protected function valueXrefLink(string $value, Tree $tree, GedcomRecordFactoryInterface $factory)… argument 69 if ($value === '@VOID@') { 74 if (preg_match('/^@(' . Gedcom::REGEX_XREF . ')@$/', $value, $match)) { 82 return '<span class="error">' . e($value) . '</span>';
|
H A D | PlaceHierarchy.php | 46 * @param string $value 50 public function canonical(string $value): string argument 52 $value = parent::canonical($value); 53 $value = preg_replace('/[, ]+/', ', ', $value); 55 return trim($value, ', ');
|
H A D | NamePieceGiven.php | 41 * @param string $value 46 public function edit(string $id, string $name, string $value, Tree $tree): string argument 50 parent::edit($id, $name, $value, $tree) . 58 * @param string $value 63 public function value(string $value, Tree $tree): string function in Fisharebest\\Webtrees\\Elements\\NamePieceGiven 65 …return '<bdi>' . preg_replace('/(\S*)\*/', '<span class="starredname">\\1</span>', e($value)) . '<…
|
/webtrees/app/Report/ |
H A D | ReportParserGenerate.php | 303 foreach ($attrs as $key => $value) { 304 if (preg_match("/^\\$(\w+)$/", $value, $match)) { 306 $value = $this->vars[$match[1]]['id']; 309 $newattrs[$key] = $value; 1023 $value = $this->desc; 1024 $value = trim($value); 1025 $this->current_element->addText($value); 1040 $value = $this->getGedcomValue($tag, $level, $this->gedrec); 1043 $tmp = new Date($value); 1044 $value = strip_tags($tmp->display()); [all …]
|
/webtrees/app/Contracts/ |
H A D | ElementInterface.php | 32 * @param string $value 36 public function canonical(string $value): string; argument 59 * @param string $value 64 public function edit(string $id, string $name, string $value, Tree $tree): string; argument 69 * @param string $value 73 public function escape(string $value): string; argument 85 * @param string $value 90 public function labelValue(string $value, Tree $tree): string; argument 111 * @param string $value 116 public function value(string $value, Tree $tree): string; function
|
/webtrees/resources/js/ |
H A D | webtrees.js | 153 const textBefore = element.value.substring(0, element.selectionStart); 154 const textAfter = element.value.substring(element.selectionEnd); 155 element.value = textBefore + text + textAfter; 172 let datestr = datefield.value; 274 if (datefield.value !== datestr) { 275 datefield.value = datestr; 387 if (greg_regex.exec(dateField.value)) { 498 dateField.value = (day < 10 ? '0' : '') + day + ' ' + monthShort[month + 1] + ' ' + year; 521 let month = parseInt(monthSel.options[monthSel.selectedIndex].value, 10); 524 let date = new Date(yearInput.value, month, dateSel.options[dateSel.selectedIndex].value); [all …]
|
/webtrees/public/js/ |
H A D | webtrees.min.js | 1 …value),l.length!==t);s=!0);}catch(e){c=!0,r=e}finally{try{if(!s&&null!=n.return&&(i=n.return(),Obj… method
|