Semantic MediaWiki and related extensions
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SMW\MediaWiki\Specials\Ask\ParameterInput Class Reference

Public Member Functions

 __construct (ParamDefinition $param, $currentValue=false)
 
 setCurrentValue ( $currentValue)
 
 setInputName ( $name)
 
 setAttributes (array $attributes)
 
 getHtml ()
 

Protected Member Functions

 getValueToUse ()
 
 getNumberInput ()
 
 getStrInput ()
 
 getBooleanInput ()
 
 getSelectInput (array $valueList)
 
 getCheckboxListInput (array $valueList)
 

Protected Attributes

 $param
 
 $currentValue
 
 $inputName
 

Detailed Description

Simple class to get a HTML input for the parameter. Usable for when creating a GUI from a parameter list.

Based on 'addOptionInput' from Special:Ask in SMW 1.5.6.

TODO: nicify HTML

Since
1.9

GNU GPL v2+

Author
Jeroen De Dauw < jeroe.nosp@m.nded.nosp@m.auw@g.nosp@m.mail.nosp@m..com >

Constructor & Destructor Documentation

◆ __construct()

SMW\MediaWiki\Specials\Ask\ParameterInput::__construct ( ParamDefinition  $param,
  $currentValue = false 
)

Constructor.

Since
1.9
Parameters
ParamDefinition$param
mixed$currentValue

Member Function Documentation

◆ getBooleanInput()

SMW\MediaWiki\Specials\Ask\ParameterInput::getBooleanInput ( )
protected

Gets a checkbox.

Since
1.9
Returns
string

◆ getCheckboxListInput()

SMW\MediaWiki\Specials\Ask\ParameterInput::getCheckboxListInput ( array  $valueList)
protected

Gets a list of input boxes for the provided values.

Since
1.9
Parameters
array$valueList
Returns
string

◆ getHtml()

SMW\MediaWiki\Specials\Ask\ParameterInput::getHtml ( )

Returns the HTML for the parameter input.

Since
1.9
Returns
string

◆ getNumberInput()

SMW\MediaWiki\Specials\Ask\ParameterInput::getNumberInput ( )
protected

Gets a short text input suitable for numbers.

Since
1.9
Returns
string

◆ getSelectInput()

SMW\MediaWiki\Specials\Ask\ParameterInput::getSelectInput ( array  $valueList)
protected

Gets a select menu for the provided values.

Since
1.9
Parameters
array$valueList
Returns
string

◆ getStrInput()

SMW\MediaWiki\Specials\Ask\ParameterInput::getStrInput ( )
protected

Gets a text input for a string.

Since
1.9
Returns
string

◆ getValueToUse()

SMW\MediaWiki\Specials\Ask\ParameterInput::getValueToUse ( )
protected

Returns the value to initially display with the input.

Since
1.9
Returns
string

◆ setAttributes()

SMW\MediaWiki\Specials\Ask\ParameterInput::setAttributes ( array  $attributes)
Since
3.0
Parameters
array$attributes

◆ setCurrentValue()

SMW\MediaWiki\Specials\Ask\ParameterInput::setCurrentValue (   $currentValue)

Sets the current value.

Since
1.9
Parameters
mixed$currentValue

◆ setInputName()

SMW\MediaWiki\Specials\Ask\ParameterInput::setInputName (   $name)

Sets the name for the input; defaults to the name of the parameter.

Since
1.9
Parameters
string$name

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

About | General disclaimer | Privacy policy