MediaWiki  1.23.2
Licenses Class Reference

A License class for use on Special:Upload. More...

Inheritance diagram for Licenses:
Collaboration diagram for Licenses:

Public Member Functions

 __construct ( $params)
 #- More...
 
 getInputHTML ( $value)
 Accessor for $this->html. More...
 
 getLicenses ()
 #- More...
 
- Public Member Functions inherited from HTMLFormField
 filter ( $value, $alldata)
 
 getAttributes (array $list)
 Returns the given attributes from the parameters. More...
 
 getDefault ()
 
 getDiv ( $value)
 Get the complete div for the input, including help text, labels, and whatever. More...
 
 getErrorsAndErrorClass ( $value)
 Determine form errors to display and their classes. More...
 
 getHelpText ()
 Determine the help text to display. More...
 
 getHelpTextHtmlDiv ( $helptext)
 Generate help text HTML in div format. More...
 
 getHelpTextHtmlRaw ( $helptext)
 Generate help text HTML formatted for raw output. More...
 
 getHelpTextHtmlTable ( $helptext)
 Generate help text HTML in table format. More...
 
 getLabel ()
 
 getLabelHtml ( $cellAttributes=array())
 
 getOptions ()
 Fetch the array of options from the field's parameters. More...
 
 getRaw ( $value)
 Get the complete raw fields for the input, including help text, labels, and whatever. More...
 
 getTableRow ( $value)
 Get the complete table row for the input, including help text, labels, and whatever. More...
 
 getTooltipAndAccessKey ()
 Returns the attributes required for the tooltip and accesskey. More...
 
 loadDataFromRequest ( $request)
 Get the value that this input has been set to from a posted form, or the input's default value if it has not been set. More...
 
 msg ()
 Get a translated interface message. More...
 
 setShowEmptyLabel ( $show)
 Tell the field whether to generate a separate label element if its label is blank. More...
 
 validate ( $value, $alldata)
 Override this function to add specific validation checks on the field input. More...
 

Protected Member Functions

 makeHtml ( $tagset, $depth=0)
 
 makeLicenses ()
 
 outputOption ( $message, $value, $attribs=null, $depth=0)
 
 stackItem (&$list, $path, $item)
 
 trimStars ( $str)
 
- Protected Member Functions inherited from HTMLFormField
 needsLabel ()
 Should this field have a label, or is there no input element with the appropriate id for the label to point to? More...
 

Protected Attributes

string $html
 
array $licenses = array()
 
string $msg
 
- Protected Attributes inherited from HTMLFormField
 $mClass = ''
 
 $mDefault
 
 $mFilterCallback
 
 $mID
 
 $mLabel
 
 $mName
 
 $mOptions = false
 
 $mOptionsLabelsNotFromMessage = false
 
bool $mShowEmptyLabels = true
 If true will generate an empty div element with no label. More...
 
 $mValidationCallback
 

Additional Inherited Members

- Static Public Member Functions inherited from HTMLFormField
static flattenOptions ( $options)
 flatten an array of options to a single array, for instance, a set of "<options>" inside "<optgroups>". More...
 
static forceToStringRecursive ( $array)
 Recursively forces values in an array to strings, because issues arise with integer 0 as a value. More...
 
- Public Attributes inherited from HTMLFormField
 $mParams
 
HTMLForm $mParent
 
- Static Protected Member Functions inherited from HTMLFormField
static formatErrors ( $errors)
 Formats one or more errors as accepted by field validation-callback. More...
 

Detailed Description

A License class for use on Special:Upload.

Definition at line 30 of file Licenses.php.

Constructor & Destructor Documentation

◆ __construct()

Licenses::__construct (   $params)

#-

Constructor

Parameters
$paramsarray

Reimplemented from HTMLFormField.

Definition at line 49 of file Licenses.php.

References $params, makeLicenses(), HTMLFormField\msg(), and wfMessage().

Member Function Documentation

◆ getInputHTML()

Licenses::getInputHTML (   $value)

Accessor for $this->html.

Parameters
$valuebool
Returns
string

Reimplemented from HTMLFormField.

Definition at line 175 of file Licenses.php.

References $attribs, $value, array(), getLicenses(), makeHtml(), outputOption(), Html\rawElement(), text, and wfMessage().

◆ getLicenses()

Licenses::getLicenses ( )

#-

Accessor for $this->licenses

Returns
array

Definition at line 164 of file Licenses.php.

References $licenses.

Referenced by getInputHTML().

◆ makeHtml()

Licenses::makeHtml (   $tagset,
  $depth = 0 
)
protected
Parameters
$tagset
$depthint

Definition at line 116 of file Licenses.php.

References array(), as, and outputOption().

Referenced by getInputHTML().

◆ makeLicenses()

Licenses::makeLicenses ( )
protected
Access:\n private

Definition at line 61 of file Licenses.php.

References $line, $lines, array(), as, list, HTMLFormField\msg(), stackItem(), and trimStars().

Referenced by __construct().

◆ outputOption()

Licenses::outputOption (   $message,
  $value,
  $attribs = null,
  $depth = 0 
)
protected
Parameters
$message
$value
$attribsnull
$depthint
Returns
string

Definition at line 145 of file Licenses.php.

References $attribs, $value, Xml\element(), and HTMLFormField\msg().

Referenced by getInputHTML(), and makeHtml().

◆ stackItem()

Licenses::stackItem ( $list,
  $path,
  $item 
)
protected
Parameters
$list
$path
$item

Definition at line 102 of file Licenses.php.

References $path, and as.

Referenced by makeLicenses().

◆ trimStars()

Licenses::trimStars (   $str)
protected
Parameters
$str
Returns
array

Definition at line 92 of file Licenses.php.

References array().

Referenced by makeLicenses().

Member Data Documentation

◆ $html

string Licenses::$html
protected

Definition at line 41 of file Licenses.php.

◆ $licenses

array Licenses::$licenses = array()
protected

Definition at line 37 of file Licenses.php.

Referenced by getLicenses().

◆ $msg

string Licenses::$msg
protected

Definition at line 33 of file Licenses.php.


The documentation for this class was generated from the following file: