BlueSpice MediaWiki REL1_27
 All Classes Namespaces Files Functions Variables Groups Pages
SMW\ParameterInput Class Reference

Public Member Functions

 __construct (ParamDefinition $param, $currentValue=false)
 
 setCurrentValue ($currentValue)
 
 setInputName ($name)
 
 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

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

Constructor.

Since
1.9
Parameters
ParamDefinition$param
mixed$currentValue

Member Function Documentation

SMW\ParameterInput::getBooleanInput ( )
protected

Gets a checkbox.

Since
1.9
Returns
string
SMW\ParameterInput::getCheckboxListInput ( array  $valueList)
protected

Gets a list of input boxes for the provided values.

Since
1.9
Parameters
array$valueList
Returns
string
SMW\ParameterInput::getHtml ( )

Returns the HTML for the parameter input.

Since
1.9
Returns
string
SMW\ParameterInput::getNumberInput ( )
protected

Gets a short text input suitable for numbers.

Since
1.9
Returns
string
SMW\ParameterInput::getSelectInput ( array  $valueList)
protected

Gets a select menu for the provided values.

Since
1.9
Parameters
array$valueList
Returns
string
SMW\ParameterInput::getStrInput ( )
protected

Gets a text input for a string.

Since
1.9
Returns
string
SMW\ParameterInput::getValueToUse ( )
protected

Returns the value to initially display with the input.

Since
1.9
Returns
string
SMW\ParameterInput::setCurrentValue (   $currentValue)

Sets the current value.

Since
1.9
Parameters
mixed$currentValue
SMW\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: