Lines Matching refs:value
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");
146 * @param string $value
151 public function edit(string $id, string $name, string $value, Tree $tree): string argument
156 $value = $this->canonical($value);
159 if (!array_key_exists($value, $values)) {
160 $values = [$value => $value] + $values;
170 'selected' => $value,
180 'value' => $value,
193 * @param string $value
197 public function editHidden(string $id, string $name, string $value): string argument
199 …m-control" type="hidden" id="' . e($id) . '" name="' . e($name) . '" value="' . e($value) . '" />';
207 * @param string $value
211 public function editTextArea(string $id, string $name, string $value): string argument
213 …rol" id="' . e($id) . '" name="' . e($name) . '" rows="3" dir="auto">' . e($value) . '</textarea>';
219 * @param string $value
223 public function escape(string $value): string argument
225 return strtr($value, ['@' => '@@']);
241 * @param string $value
246 public function labelValue(string $value, Tree $tree): string argument
249 $value = '<span class="value align-top">' . $this->value($value, $tree) . '</span>';
250 … $html = I18N::translate(/* I18N: e.g. "Occupation: farmer" */ '%1$s: %2$s', $label, $value);
271 foreach ($this->subtags as $key => $value) {
275 $tmp[$key] = $value;
293 * @param string $value
298 public function value(string $value, Tree $tree): string function in Fisharebest\\Webtrees\\Elements\\AbstractElement
303 if (str_contains($value, "\n")) {
304 return '<span class="ut d-inline-block">' . nl2br(e($value, false)) . '</span>';
307 return '<span class="ut">' . e($value) . '</span>';
310 $canonical = $this->canonical($value);
312 return $values[$canonical] ?? '<bdi>' . e($value) . '</bdi>';
328 * @param string $value
332 protected function valueAutoLink(string $value): string argument
334 $canonical = $this->canonical($value);
353 * @param string $value
358 protected function valueFormatted(string $value, Tree $tree): string argument
360 $canonical = $this->canonical($value);
376 * @param string $value
380 protected function valueLink(string $value): string argument
382 $canonical = $this->canonical($value);
385 return '<a dir="auto" href="' . e($canonical) . '">' . e($value) . '</a>';
388 return e($value);
394 * @param string $value
398 public function valueNumeric(string $value): string argument
400 $canonical = $this->canonical($value);
406 return e($value);