MediaWiki  1.23.8
HTMLFormField.php
Go to the documentation of this file.
1 <?php
2 
7 abstract class HTMLFormField {
8  public $mParams;
9 
11  protected $mFilterCallback;
12  protected $mName;
13  protected $mLabel; # String label. Set on construction
14  protected $mID;
15  protected $mClass = '';
16  protected $mDefault;
17  protected $mOptions = false;
18  protected $mOptionsLabelsNotFromMessage = false;
19 
24  protected $mShowEmptyLabels = true;
25 
29  public $mParent;
30 
41  abstract function getInputHTML( $value );
42 
53  function msg() {
54  $args = func_get_args();
55 
56  if ( $this->mParent ) {
57  $callback = array( $this->mParent, 'msg' );
58  } else {
59  $callback = 'wfMessage';
60  }
61 
62  return call_user_func_array( $callback, $args );
63  }
64 
75  function validate( $value, $alldata ) {
76  if ( isset( $this->mParams['required'] )
77  && $this->mParams['required'] !== false
78  && $value === ''
79  ) {
80  return $this->msg( 'htmlform-required' )->parse();
81  }
82 
83  if ( isset( $this->mValidationCallback ) ) {
84  return call_user_func( $this->mValidationCallback, $value, $alldata, $this->mParent );
85  }
86 
87  return true;
88  }
89 
90  function filter( $value, $alldata ) {
91  if ( isset( $this->mFilterCallback ) ) {
92  $value = call_user_func( $this->mFilterCallback, $value, $alldata, $this->mParent );
93  }
94 
95  return $value;
96  }
97 
104  protected function needsLabel() {
105  return true;
106  }
107 
117  public function setShowEmptyLabel( $show ) {
118  $this->mShowEmptyLabels = $show;
119  }
120 
128  function loadDataFromRequest( $request ) {
129  if ( $request->getCheck( $this->mName ) ) {
130  return $request->getText( $this->mName );
131  } else {
132  return $this->getDefault();
133  }
134  }
135 
144  function __construct( $params ) {
145  $this->mParams = $params;
146 
147  # Generate the label from a message, if possible
148  if ( isset( $params['label-message'] ) ) {
149  $msgInfo = $params['label-message'];
150 
151  if ( is_array( $msgInfo ) ) {
152  $msg = array_shift( $msgInfo );
153  } else {
154  $msg = $msgInfo;
155  $msgInfo = array();
156  }
157 
158  $this->mLabel = wfMessage( $msg, $msgInfo )->parse();
159  } elseif ( isset( $params['label'] ) ) {
160  if ( $params['label'] === '&#160;' ) {
161  // Apparently some things set &nbsp directly and in an odd format
162  $this->mLabel = '&#160;';
163  } else {
164  $this->mLabel = htmlspecialchars( $params['label'] );
165  }
166  } elseif ( isset( $params['label-raw'] ) ) {
167  $this->mLabel = $params['label-raw'];
168  }
169 
170  $this->mName = "wp{$params['fieldname']}";
171  if ( isset( $params['name'] ) ) {
172  $this->mName = $params['name'];
173  }
174 
175  $validName = Sanitizer::escapeId( $this->mName );
176  if ( $this->mName != $validName && !isset( $params['nodata'] ) ) {
177  throw new MWException( "Invalid name '{$this->mName}' passed to " . __METHOD__ );
178  }
179 
180  $this->mID = "mw-input-{$this->mName}";
181 
182  if ( isset( $params['default'] ) ) {
183  $this->mDefault = $params['default'];
184  }
185 
186  if ( isset( $params['id'] ) ) {
187  $id = $params['id'];
188  $validId = Sanitizer::escapeId( $id );
189 
190  if ( $id != $validId ) {
191  throw new MWException( "Invalid id '$id' passed to " . __METHOD__ );
192  }
193 
194  $this->mID = $id;
195  }
196 
197  if ( isset( $params['cssclass'] ) ) {
198  $this->mClass = $params['cssclass'];
199  }
200 
201  if ( isset( $params['validation-callback'] ) ) {
202  $this->mValidationCallback = $params['validation-callback'];
203  }
204 
205  if ( isset( $params['filter-callback'] ) ) {
206  $this->mFilterCallback = $params['filter-callback'];
207  }
208 
209  if ( isset( $params['flatlist'] ) ) {
210  $this->mClass .= ' mw-htmlform-flatlist';
211  }
212 
213  if ( isset( $params['hidelabel'] ) ) {
214  $this->mShowEmptyLabels = false;
215  }
216  }
217 
226  function getTableRow( $value ) {
227  list( $errors, $errorClass ) = $this->getErrorsAndErrorClass( $value );
228  $inputHtml = $this->getInputHTML( $value );
229  $fieldType = get_class( $this );
230  $helptext = $this->getHelpTextHtmlTable( $this->getHelpText() );
231  $cellAttributes = array();
232 
233  if ( !empty( $this->mParams['vertical-label'] ) ) {
234  $cellAttributes['colspan'] = 2;
235  $verticalLabel = true;
236  } else {
237  $verticalLabel = false;
238  }
239 
240  $label = $this->getLabelHtml( $cellAttributes );
241 
242  $field = Html::rawElement(
243  'td',
244  array( 'class' => 'mw-input' ) + $cellAttributes,
245  $inputHtml . "\n$errors"
246  );
247 
248  if ( $verticalLabel ) {
249  $html = Html::rawElement( 'tr', array( 'class' => 'mw-htmlform-vertical-label' ), $label );
250  $html .= Html::rawElement( 'tr',
251  array( 'class' => "mw-htmlform-field-$fieldType {$this->mClass} $errorClass" ),
252  $field );
253  } else {
254  $html =
255  Html::rawElement( 'tr',
256  array( 'class' => "mw-htmlform-field-$fieldType {$this->mClass} $errorClass" ),
257  $label . $field );
258  }
259 
260  return $html . $helptext;
261  }
262 
272  public function getDiv( $value ) {
273  list( $errors, $errorClass ) = $this->getErrorsAndErrorClass( $value );
274  $inputHtml = $this->getInputHTML( $value );
275  $fieldType = get_class( $this );
276  $helptext = $this->getHelpTextHtmlDiv( $this->getHelpText() );
277  $cellAttributes = array();
278  $label = $this->getLabelHtml( $cellAttributes );
279 
280  $outerDivClass = array(
281  'mw-input',
282  'mw-htmlform-nolabel' => ( $label === '' )
283  );
284 
285  $field = Html::rawElement(
286  'div',
287  array( 'class' => $outerDivClass ) + $cellAttributes,
288  $inputHtml . "\n$errors"
289  );
290  $divCssClasses = array( "mw-htmlform-field-$fieldType", $this->mClass, $errorClass );
291  if ( $this->mParent->isVForm() ) {
292  $divCssClasses[] = 'mw-ui-vform-div';
293  }
294  $html = Html::rawElement( 'div', array( 'class' => $divCssClasses ), $label . $field );
295  $html .= $helptext;
296 
297  return $html;
298  }
299 
309  public function getRaw( $value ) {
310  list( $errors, ) = $this->getErrorsAndErrorClass( $value );
311  $inputHtml = $this->getInputHTML( $value );
312  $helptext = $this->getHelpTextHtmlRaw( $this->getHelpText() );
313  $cellAttributes = array();
314  $label = $this->getLabelHtml( $cellAttributes );
315 
316  $html = "\n$errors";
317  $html .= $label;
318  $html .= $inputHtml;
319  $html .= $helptext;
320 
321  return $html;
322  }
323 
331  public function getHelpTextHtmlTable( $helptext ) {
332  if ( is_null( $helptext ) ) {
333  return '';
334  }
335 
336  $row = Html::rawElement( 'td', array( 'colspan' => 2, 'class' => 'htmlform-tip' ), $helptext );
337  $row = Html::rawElement( 'tr', array(), $row );
338 
339  return $row;
340  }
341 
350  public function getHelpTextHtmlDiv( $helptext ) {
351  if ( is_null( $helptext ) ) {
352  return '';
353  }
354 
355  $div = Html::rawElement( 'div', array( 'class' => 'htmlform-tip' ), $helptext );
356 
357  return $div;
358  }
359 
367  public function getHelpTextHtmlRaw( $helptext ) {
368  return $this->getHelpTextHtmlDiv( $helptext );
369  }
370 
376  public function getHelpText() {
377  $helptext = null;
378 
379  if ( isset( $this->mParams['help-message'] ) ) {
380  $this->mParams['help-messages'] = array( $this->mParams['help-message'] );
381  }
382 
383  if ( isset( $this->mParams['help-messages'] ) ) {
384  foreach ( $this->mParams['help-messages'] as $name ) {
385  $helpMessage = (array)$name;
386  $msg = $this->msg( array_shift( $helpMessage ), $helpMessage );
387 
388  if ( $msg->exists() ) {
389  if ( is_null( $helptext ) ) {
390  $helptext = '';
391  } else {
392  $helptext .= $this->msg( 'word-separator' )->escaped(); // some space
393  }
394  $helptext .= $msg->parse(); // Append message
395  }
396  }
397  } elseif ( isset( $this->mParams['help'] ) ) {
398  $helptext = $this->mParams['help'];
399  }
400 
401  return $helptext;
402  }
403 
411  public function getErrorsAndErrorClass( $value ) {
412  $errors = $this->validate( $value, $this->mParent->mFieldData );
413 
414  if ( $errors === true ||
415  ( !$this->mParent->getRequest()->wasPosted() && $this->mParent->getMethod() === 'post' )
416  ) {
417  $errors = '';
418  $errorClass = '';
419  } else {
420  $errors = self::formatErrors( $errors );
421  $errorClass = 'mw-htmlform-invalid-input';
422  }
423 
424  return array( $errors, $errorClass );
425  }
426 
427  function getLabel() {
428  return is_null( $this->mLabel ) ? '' : $this->mLabel;
429  }
430 
431  function getLabelHtml( $cellAttributes = array() ) {
432  # Don't output a for= attribute for labels with no associated input.
433  # Kind of hacky here, possibly we don't want these to be <label>s at all.
434  $for = array();
435 
436  if ( $this->needsLabel() ) {
437  $for['for'] = $this->mID;
438  }
439 
440  $labelValue = trim( $this->getLabel() );
441  $hasLabel = false;
442  if ( $labelValue !== '&#160;' && $labelValue !== '' ) {
443  $hasLabel = true;
444  }
445 
446  $displayFormat = $this->mParent->getDisplayFormat();
447  $html = '';
448 
449  if ( $displayFormat === 'table' ) {
450  $html =
451  Html::rawElement( 'td',
452  array( 'class' => 'mw-label' ) + $cellAttributes,
453  Html::rawElement( 'label', $for, $labelValue ) );
454  } elseif ( $hasLabel || $this->mShowEmptyLabels ) {
455  if ( $displayFormat === 'div' ) {
456  $html =
457  Html::rawElement( 'div',
458  array( 'class' => 'mw-label' ) + $cellAttributes,
459  Html::rawElement( 'label', $for, $labelValue ) );
460  } else {
461  $html = Html::rawElement( 'label', $for, $labelValue );
462  }
463  }
464 
465  return $html;
466  }
467 
468  function getDefault() {
469  if ( isset( $this->mDefault ) ) {
470  return $this->mDefault;
471  } else {
472  return null;
473  }
474  }
475 
481  public function getTooltipAndAccessKey() {
482  if ( empty( $this->mParams['tooltip'] ) ) {
483  return array();
484  }
485 
486  return Linker::tooltipAndAccesskeyAttribs( $this->mParams['tooltip'] );
487  }
488 
495  public function getAttributes( array $list ) {
496  static $boolAttribs = array( 'disabled', 'required', 'autofocus', 'multiple', 'readonly' );
497 
498  $ret = array();
499 
500  foreach ( $list as $key ) {
501  if ( in_array( $key, $boolAttribs ) ) {
502  if ( !empty( $this->mParams[$key] ) ) {
503  $ret[$key] = '';
504  }
505  } elseif ( isset( $this->mParams[$key] ) ) {
506  $ret[$key] = $this->mParams[$key];
507  }
508  }
509 
510  return $ret;
511  }
512 
520  private function lookupOptionsKeys( $options ) {
521  $ret = array();
522  foreach ( $options as $key => $value ) {
523  $key = $this->msg( $key )->plain();
524  $ret[$key] = is_array( $value )
525  ? $this->lookupOptionsKeys( $value )
526  : strval( $value );
527  }
528  return $ret;
529  }
530 
538  static function forceToStringRecursive( $array ) {
539  if ( is_array( $array ) ) {
540  return array_map( array( __CLASS__, 'forceToStringRecursive' ), $array );
541  } else {
542  return strval( $array );
543  }
544  }
545 
552  public function getOptions() {
553  if ( $this->mOptions === false ) {
554  if ( array_key_exists( 'options-messages', $this->mParams ) ) {
555  $this->mOptions = $this->lookupOptionsKeys( $this->mParams['options-messages'] );
556  } elseif ( array_key_exists( 'options', $this->mParams ) ) {
557  $this->mOptionsLabelsNotFromMessage = true;
558  $this->mOptions = self::forceToStringRecursive( $this->mParams['options'] );
559  } elseif ( array_key_exists( 'options-message', $this->mParams ) ) {
561  $message = $this->msg( $this->mParams['options-message'] )->inContentLanguage()->plain();
562 
563  $optgroup = false;
564  $this->mOptions = array();
565  foreach ( explode( "\n", $message ) as $option ) {
566  $value = trim( $option );
567  if ( $value == '' ) {
568  continue;
569  } elseif ( substr( $value, 0, 1 ) == '*' && substr( $value, 1, 1 ) != '*' ) {
570  # A new group is starting...
571  $value = trim( substr( $value, 1 ) );
572  $optgroup = $value;
573  } elseif ( substr( $value, 0, 2 ) == '**' ) {
574  # groupmember
575  $opt = trim( substr( $value, 2 ) );
576  if ( $optgroup === false ) {
577  $this->mOptions[$opt] = $opt;
578  } else {
579  $this->mOptions[$optgroup][$opt] = $opt;
580  }
581  } else {
582  # groupless reason list
583  $optgroup = false;
584  $this->mOptions[$option] = $option;
585  }
586  }
587  } else {
588  $this->mOptions = null;
589  }
590  }
591 
592  return $this->mOptions;
593  }
594 
603  public static function flattenOptions( $options ) {
604  $flatOpts = array();
605 
606  foreach ( $options as $value ) {
607  if ( is_array( $value ) ) {
608  $flatOpts = array_merge( $flatOpts, self::flattenOptions( $value ) );
609  } else {
610  $flatOpts[] = $value;
611  }
612  }
613 
614  return $flatOpts;
615  }
616 
624  protected static function formatErrors( $errors ) {
625  if ( is_array( $errors ) && count( $errors ) === 1 ) {
626  $errors = array_shift( $errors );
627  }
628 
629  if ( is_array( $errors ) ) {
630  $lines = array();
631  foreach ( $errors as $error ) {
632  if ( $error instanceof Message ) {
633  $lines[] = Html::rawElement( 'li', array(), $error->parse() );
634  } else {
635  $lines[] = Html::rawElement( 'li', array(), $error );
636  }
637  }
638 
639  return Html::rawElement( 'ul', array( 'class' => 'error' ), implode( "\n", $lines ) );
640  } else {
641  if ( $errors instanceof Message ) {
642  $errors = $errors->parse();
643  }
644 
645  return Html::rawElement( 'span', array( 'class' => 'error' ), $errors );
646  }
647  }
648 }
HTMLFormField\getOptions
getOptions()
Fetch the array of options from the field's parameters.
Definition: HTMLFormField.php:550
HTMLFormField\__construct
__construct( $params)
Initialise the object.
Definition: HTMLFormField.php:142
php
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
Definition: skin.txt:62
HTMLFormField\$mLabel
$mLabel
Definition: HTMLFormField.php:13
$html
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned and may include noclasses & $html
Definition: hooks.txt:1530
HTMLFormField\setShowEmptyLabel
setShowEmptyLabel( $show)
Tell the field whether to generate a separate label element if its label is blank.
Definition: HTMLFormField.php:115
HTMLFormField\getErrorsAndErrorClass
getErrorsAndErrorClass( $value)
Determine form errors to display and their classes.
Definition: HTMLFormField.php:409
HTMLFormField\validate
validate( $value, $alldata)
Override this function to add specific validation checks on the field input.
Definition: HTMLFormField.php:73
$ret
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses & $ret
Definition: hooks.txt:1530
$params
$params
Definition: styleTest.css.php:40
HTMLFormField\formatErrors
static formatErrors( $errors)
Formats one or more errors as accepted by field validation-callback.
Definition: HTMLFormField.php:622
HTMLFormField\$mClass
$mClass
Definition: HTMLFormField.php:15
HTMLFormField\needsLabel
needsLabel()
Should this field have a label, or is there no input element with the appropriate id for the label to...
Definition: HTMLFormField.php:102
HTMLFormField\getTableRow
getTableRow( $value)
Get the complete table row for the input, including help text, labels, and whatever.
Definition: HTMLFormField.php:224
HTMLFormField\getHelpTextHtmlTable
getHelpTextHtmlTable( $helptext)
Generate help text HTML in table format.
Definition: HTMLFormField.php:329
Linker\tooltipAndAccesskeyAttribs
static tooltipAndAccesskeyAttribs( $name)
Returns the attributes for the tooltip and access key.
Definition: Linker.php:2298
HTMLFormField\getHelpText
getHelpText()
Determine the help text to display.
Definition: HTMLFormField.php:374
MWException
MediaWiki exception.
Definition: MWException.php:26
HTMLFormField\$mName
$mName
Definition: HTMLFormField.php:12
HTMLFormField
The parent class to generate form fields.
Definition: HTMLFormField.php:7
wfMessage
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned and may include noclasses after processing after in associative array form externallinks including delete and has completed for all link tables default is conds Array Extra conditions for the No matching items in log is displayed if loglist is empty msgKey Array If you want a nice box with a set this to the key of the message First element is the message additional optional elements are parameters for the key that are processed with wfMessage() -> params() ->parseAsBlock() - offset Set to overwrite offset parameter in $wgRequest set to '' to unset offset - wrap String Wrap the message in html(usually something like "&lt
HTMLFormField\lookupOptionsKeys
lookupOptionsKeys( $options)
Given an array of msg-key => value mappings, returns an array with keys being the message texts.
Definition: HTMLFormField.php:518
$lines
$lines
Definition: router.php:65
HTMLFormField\$mDefault
$mDefault
Definition: HTMLFormField.php:16
array
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
list
deferred txt A few of the database updates required by various functions here can be deferred until after the result page is displayed to the user For updating the view updating the linked to tables after a etc PHP does not yet have any way to tell the server to actually return and disconnect while still running these but it might have such a feature in the future We handle these by creating a deferred update object and putting those objects on a global list
Definition: deferred.txt:11
HTMLFormField\filter
filter( $value, $alldata)
Definition: HTMLFormField.php:88
Sanitizer\escapeId
static escapeId( $id, $options=array())
Given a value, escape it so that it can be used in an id attribute and return it.
Definition: Sanitizer.php:1099
HTMLFormField\$mID
$mID
Definition: HTMLFormField.php:14
$options
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped & $options
Definition: hooks.txt:1530
HTMLFormField\getLabelHtml
getLabelHtml( $cellAttributes=array())
Definition: HTMLFormField.php:429
HTMLFormField\$mParent
HTMLForm $mParent
Definition: HTMLFormField.php:27
$name
Allows to change the fields on the form that will be generated $name
Definition: hooks.txt:336
$value
$value
Definition: styleTest.css.php:45
HTMLFormField\$mValidationCallback
$mValidationCallback
Definition: HTMLFormField.php:10
HTMLFormField\getDefault
getDefault()
Definition: HTMLFormField.php:466
HTMLFormField\$mFilterCallback
$mFilterCallback
Definition: HTMLFormField.php:11
HTMLFormField\msg
msg()
Get a translated interface message.
Definition: HTMLFormField.php:51
HTMLFormField\getLabel
getLabel()
Definition: HTMLFormField.php:425
HTMLFormField\$mOptions
$mOptions
Definition: HTMLFormField.php:17
HTMLFormField\$mParams
$mParams
Definition: HTMLFormField.php:8
HTMLFormField\getHelpTextHtmlRaw
getHelpTextHtmlRaw( $helptext)
Generate help text HTML formatted for raw output.
Definition: HTMLFormField.php:365
HTMLFormField\$mShowEmptyLabels
bool $mShowEmptyLabels
If true will generate an empty div element with no label.
Definition: HTMLFormField.php:23
$args
if( $line===false) $args
Definition: cdb.php:62
HTMLFormField\getDiv
getDiv( $value)
Get the complete div for the input, including help text, labels, and whatever.
Definition: HTMLFormField.php:270
on
We ve cleaned up the code here by removing clumps of infrequently used code and moving them off somewhere else It s much easier for someone working with this code to see what s _really_ going on
Definition: hooks.txt:86
HTMLFormField\getInputHTML
getInputHTML( $value)
This function must be implemented to return the HTML to generate the input object itself.
as
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
Definition: distributors.txt:9
HTMLFormField\$mOptionsLabelsNotFromMessage
$mOptionsLabelsNotFromMessage
Definition: HTMLFormField.php:18
HTMLFormField\getRaw
getRaw( $value)
Get the complete raw fields for the input, including help text, labels, and whatever.
Definition: HTMLFormField.php:307
HTMLFormField\forceToStringRecursive
static forceToStringRecursive( $array)
Recursively forces values in an array to strings, because issues arise with integer 0 as a value.
Definition: HTMLFormField.php:536
HTMLFormField\getTooltipAndAccessKey
getTooltipAndAccessKey()
Returns the attributes required for the tooltip and accesskey.
Definition: HTMLFormField.php:479
HTMLFormField\flattenOptions
static flattenOptions( $options)
flatten an array of options to a single array, for instance, a set of "<options>" inside "<optgroups>...
Definition: HTMLFormField.php:601
HTMLFormField\getHelpTextHtmlDiv
getHelpTextHtmlDiv( $helptext)
Generate help text HTML in div format.
Definition: HTMLFormField.php:348
$error
usually copyright or history_copyright This message must be in HTML not wikitext $subpages will be ignored and the rest of subPageSubtitle() will run. 'SkinTemplateBuildNavUrlsNav_urlsAfterPermalink' whether MediaWiki currently thinks this is a CSS JS page Hooks may change this value to override the return value of Title::isCssOrJsPage(). 'TitleIsAlwaysKnown' whether MediaWiki currently thinks this page is known isMovable() always returns false. $title whether MediaWiki currently thinks this page is movable Hooks may change this value to override the return value of Title::isMovable(). 'TitleIsWikitextPage' whether MediaWiki currently thinks this is a wikitext page Hooks may change this value to override the return value of Title::isWikitextPage() 'TitleMove' use UploadVerification and UploadVerifyFile instead where the first element is the message key and the remaining elements are used as parameters to the message based on mime etc Preferred in most cases over UploadVerification object with all info about the upload string as detected by MediaWiki Handlers will typically only apply for specific mime types object & $error
Definition: hooks.txt:2573
Html\rawElement
static rawElement( $element, $attribs=array(), $contents='')
Returns an HTML element in a string.
Definition: Html.php:124
HTMLFormField\getAttributes
getAttributes(array $list)
Returns the given attributes from the parameters.
Definition: HTMLFormField.php:493
HTMLForm
Object handling generic submission, CSRF protection, layout and other logic for UI forms.
Definition: HTMLForm.php:100
HTMLFormField\loadDataFromRequest
loadDataFromRequest( $request)
Get the value that this input has been set to from a posted form, or the input's default value if it ...
Definition: HTMLFormField.php:126