Home
last modified time | relevance | path

Searched refs:rawvalue (Results 1 – 25 of 31) sorted by relevance

12

/plugin/struct/types/
H A DDate.php41 * @param string $rawvalue the current value
46 public function valueEditor($name, $rawvalue, $htmlID) argument
48 if ($this->config['prefilltoday'] && !$rawvalue) {
49 $rawvalue = date('Y-m-d');
54 'value' => $rawvalue,
69 * @param string|int $rawvalue
73 public function validate($rawvalue) argument
75 $rawvalue = parent::validate($rawvalue);
76 [$rawvalue] = explode(' ', $rawvalue, 2); // strip off time if there is any
78 [$year, $month, $day] = explode('-', $rawvalue, 3);
[all …]
H A DLongText.php39 * @param int|string $rawvalue
42 public function validate($rawvalue) argument
44 $rawvalue = rtrim($rawvalue);
45 $rawvalue = cleanText($rawvalue);
46 return $rawvalue;
53 * @param string $rawvalue
58 public function valueEditor($name, $rawvalue, $htmlID) argument
60 $rawvalue = formText($rawvalue);
70 return "<textarea $attributes>$rawvalue</textarea>";
H A DDateTime.php39 * @param string $rawvalue the current value
44 public function valueEditor($name, $rawvalue, $htmlID) argument
46 if ($this->config['prefilltoday'] && !$rawvalue) {
47 $rawvalue = date('Y-m-d\TH:i');
49 $rawvalue = str_replace(' ', 'T', $rawvalue);
52 'value' => $rawvalue,
67 * @param string|array $rawvalue
71 public function validate($rawvalue) argument
73 $rawvalue = trim($rawvalue);
74 [$date, $time] = array_pad(preg_split('/[ |T]/', $rawvalue, 2), 2, '');
[all …]
H A DColor.php16 public function validate($rawvalue) argument
18 $rawvalue = trim(strtolower($rawvalue));
19 if (!preg_match('/^#[a-f0-9]{6}$/', $rawvalue)) {
24 if ($rawvalue === strtolower($this->config['default'])) {
25 $rawvalue = '';
28 return $rawvalue;
64 public function valueEditor($name, $rawvalue, $htmlID) argument
66 if (!preg_match('/^#[a-f0-9]{6}$/', $rawvalue)) {
68 $rawvalue = $this->config['default'];
73 'value' => $rawvalue,
H A DDecimal.php95 * @param int|string $rawvalue
99 public function validate($rawvalue) argument
101 $rawvalue = parent::validate($rawvalue);
102 $rawvalue = str_replace(',', '.', $rawvalue); // we accept both
104 if ((string)$rawvalue != (string)(float) $rawvalue) {
108 if ($this->config['min'] !== '' && (float) $rawvalue < (float) $this->config['min']) {
112 if ($this->config['max'] !== '' && (float) $rawvalue > (float) $this->config['max']) {
116 return $rawvalue;
H A DMail.php32 * @param int|string $rawvalue
35 public function validate($rawvalue) argument
37 $rawvalue = parent::validate($rawvalue);
39 $mail = $this->config['prefix'] . $rawvalue . $this->config['postfix'];
44 return $rawvalue;
H A DMedia.php20 * @param string $rawvalue
23 public function validate($rawvalue) argument
25 $rawvalue = parent::validate($rawvalue);
27 if (!trim($this->config['mime'])) return $rawvalue;
32 [, $mime, ] = mimetype($rawvalue, false);
34 if (str_starts_with($mime, $allow)) return $rawvalue;
94 * @param string $rawvalue the current value
100 public function valueEditor($name, $rawvalue, $htmlID) argument
109 'value' => $rawvalue,
H A DUrl.php20 * @param string $rawvalue
23 public function validate($rawvalue) argument
25 $rawvalue = parent::validate($rawvalue);
27 $url = $this->buildURL($rawvalue);
35 return $rawvalue;
H A DUser.php24 * @param string $rawvalue the user to validate
27 public function validate($rawvalue) argument
29 $rawvalue = parent::validate($rawvalue);
34 $info = $auth->getUserData($rawvalue, false);
35 if ($info === false) throw new ValidationException('User not found', $rawvalue);
38 return $rawvalue;
H A DCheckbox.php26 * @param string $rawvalue
31 public function valueEditor($name, $rawvalue, $htmlID) argument
36 if ($rawvalue == $opt) {
H A DDropdown.php31 * @param string $rawvalue
34 public function valueEditor($name, $rawvalue, $htmlID) argument
44 if ($opt == $rawvalue) {
H A DAbstractBaseType.php285 * @param string $rawvalue the current value
290 public function valueEditor($name, $rawvalue, $htmlID) argument
301 'value' => $rawvalue,
511 * @param string|int $rawvalue
515 public function validate($rawvalue) argument
517 return trim($rawvalue);
/plugin/struct/meta/
H A DValueValidator.php33 public function validateValue(Column $col, &$rawvalue) argument
35 if ($rawvalue === null) $rawvalue = ''; // no data was passed
40 if ($type->isMulti() && !is_array($rawvalue)) {
41 $rawvalue = $type->splitValues($rawvalue);
47 if (is_array($rawvalue)) {
48 $rawvalue = array_filter($rawvalue, [$this, 'filter']);
49 $rawvalue = array_values($rawvalue); // reset the array keys
50 if ($rawvalue === []) {
51 $rawvalue = [''];
56 return $this->validateField($type, $trans, $rawvalue);
H A DValue.php21 protected $rawvalue; variable in dokuwiki\\plugin\\struct\\meta\\Value
70 return $this->rawvalue;
118 $this->rawvalue = [];
131 $this->rawvalue[] = $raw;
144 $this->rawvalue = (string)array_shift($this->rawvalue);
157 return ($this->rawvalue === '' || $this->rawvalue === []);
208 return $this->column->getType()->multiValueEditor($name, $this->rawvalue, $id);
210 return $this->column->getType()->valueEditor($name, $this->rawvalue, $id);
H A DCSVSerialImporter.php67 * @param mixed $rawvalue
70 protected function validateValue(Column $col, &$rawvalue) argument
74 return parent::validateValue($col, $rawvalue);
77 $pid = cleanID($rawvalue);
H A DCSVPageImporter.php124 * @param mixed $rawvalue
127 protected function validateValue(Column $col, &$rawvalue) argument
131 $pid = cleanID($rawvalue);
149 return parent::validateValue($col, $rawvalue);
/plugin/structnumber/types/
DNumber.php49 * @param int|string $rawvalue
53 public function validate($rawvalue) argument
55 $rawvalue = parent::validate($rawvalue);
56 $rawvalue = str_replace(',', '.', $rawvalue); // we accept both
58 if ((string)$rawvalue != (string)floatval($rawvalue)) {
62 if ($this->config['min'] !== '' && floatval($rawvalue) < floatval($this->config['min'])) {
66 if ($this->config['max'] !== '' && floatval($rawvalue) > floatval($this->config['max'])) {
70 return $rawvalue;
/plugin/structgeohash/types/
DGeoHash.php27 public function validate($rawvalue) { argument
29 if(!preg_match('/^[a-z0-9]{12}$/', $rawvalue)) {
30 $rawvalue = $this->config['default'];
32 return $rawvalue;
51 public function valueEditor($name, $rawvalue, $htmlID) { argument
52 if(!preg_match('/^[a-z0-9]{12}$/', $rawvalue)) {
53 $rawvalue = $this->config['default'];
60 'value' => $rawvalue,
/plugin/structgroup8/types/
DGroup.php21 * @param string $rawvalue the user to validate
24 public function validate($rawvalue) { argument
25 $rawvalue = parent::validate($rawvalue);
31 if(! in_array($rawvalue, $authgroup->getGroups())) {
32 throw new ValidationException('Group not found: "' . $rawvalue .
37 return $rawvalue;
/plugin/structgroup/types/
DGroup.php21 * @param string $rawvalue the user to validate
24 public function validate($rawvalue) { argument
25 $rawvalue = parent::validate($rawvalue);
31 if(! in_array($rawvalue, $authgroup->getGroups())) {
32 throw new ValidationException('Group not found: "' . $rawvalue .
37 return $rawvalue;
/plugin/structprogress/types/
DProgress.php29 public function validate($rawvalue) argument
31 $rawvalue = parent::validate($rawvalue);
32 $rawvalue = str_replace(',', '.', $rawvalue); // we accept both
39 if ((string)$rawvalue != (string)floatval($rawvalue)) {
43 if (floatval($rawvalue) < $minvalue) {
47 if ($maxvalue !== 0 && floatval($rawvalue) > $maxvalue) {
51 return $rawvalue;
/plugin/structsection/types/
DSection.php25 * @param string $rawvalue
30 public function valueEditor($name, $rawvalue, $htmlID) argument
32 $rawvalue = formText($rawvalue);
41 return "<textarea $attributes>$rawvalue</textarea>";
/plugin/structcombolookup/types/
DNarrowingLookup.php57 protected function getRawValueNarrowingValue($rawvalue) { argument
66 $search->addFilter($this->config['field'], $rawvalue, '=');
108 protected function parentValueEditor($name, $rawvalue, $htmlID) { argument
117 if($opt == $this->getRawValueNarrowingValue($rawvalue)) {
134 * @param string $rawvalue
137 public function valueEditor($name, $rawvalue, $htmlID) { argument
138 $html = $this->parentValueEditor($name, $rawvalue, $htmlID);
152 if($opt == $rawvalue) {
/plugin/bez/struct/
H A DBezType.php77 * @param string $rawvalue
80 public function validate($rawvalue) { argument
81 preg_match('/#([a-z]*)([0-9]+)/', $rawvalue, $matches);
102 return $rawvalue;
/plugin/structcombolookup/
Daction.php58 $rawvalue = $field->getParam('value');
72 $search->addFilter($id, $rawvalue, '=');

12