Go to the documentation of this file.
8 $p = parent::validate(
$value, $alldata );
14 if ( !is_array(
$value ) ) {
18 # If all options are valid, array_intersect of the valid options
19 # and the provided options will return the provided options.
22 $validValues = array_intersect(
$value, $validOptions );
23 if ( count( $validValues ) == count(
$value ) ) {
26 return $this->
msg(
'htmlform-select-badoption' )->parse();
41 $elementFunc =
array(
'Html', $this->mOptionsLabelsNotFromMessage ?
'rawElement' :
'element' );
44 if ( is_array( $info ) ) {
48 $thisAttribs =
array(
'id' =>
"{$this->mID}-$info",
'value' => $info );
52 in_array( $info,
$value,
true ),
55 $checkbox .=
' ' . call_user_func( $elementFunc,
57 array(
'for' =>
"{$this->mID}-$info" ),
63 array(
'class' =>
'mw-htmlform-flatlist-item' ),
78 if ( $this->mParent->getMethod() ==
'post' ) {
79 if ( $request->wasPosted() ) {
80 # Checkboxes are just not added to the request arrays if they're not checked,
81 # so it's perfectly possible for there not to be an entry at all
82 return $request->getArray( $this->mName,
array() );
84 # That's ok, the user has not yet submitted the form, so show the defaults
88 # This is the impossible case: if we look at $_GET and see no data for our
89 # field, is it because the user has not yet submitted the form, or that they
90 # have submitted it with all the options unchecked? We will have to assume the
91 # latter, which basically means that you can't specify 'positive' defaults
94 return $request->getArray( $this->mName,
array() );
99 if ( isset( $this->mDefault ) ) {
112 $res[
"$opt"] = in_array( $opt, $data,
true );
loadDataFromRequest( $request)
needsLabel()
Should this field have a label, or is there no input element with the appropriate id for the label to...
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
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
filterDataForSubmit( $data)
Support for seperating multi-option preferences into multiple preferences Due to lack of array suppor...
validate( $value, $alldata)
Override this function to add specific validation checks on the field input.
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
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
static check( $name, $checked=false, $attribs=array())
Convenience function to build an HTML checkbox.
getInputHTML( $value)
This function must be implemented to return the HTML to generate the input object itself.
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
formatOptions( $options, $value)
static rawElement( $element, $attribs=array(), $contents='')
Returns an HTML element in a string.
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 & $attribs