MediaWiki  1.30.0
InputBox Class Reference

Public Member Functions

 __construct ( $parser)
 
 extractOptions ( $text)
 Extract options from a blob of text. More...
 
 getCommentForm ()
 Generate new section form. More...
 
 getCreateForm ()
 Generate create page form. More...
 
 getMoveForm ()
 Generate move page form. More...
 
 getSearchForm ( $type)
 Generate search form. More...
 
 getSearchForm2 ()
 Generate search form version 2. More...
 
 isValidColor ( $color)
 Do a security check on the bgcolor parameter. More...
 
 render ()
 

Private Member Functions

 bgColorStyle ()
 
 getEditActionArgs ()
 
 getLinebreakClasses ()
 Get common classes, that could be added and depend on, if a line break between a button and an input field is added or not. More...
 
 languageConvert ( $text)
 For compatability with pre T119158 behaviour. More...
 
 shouldUseVE ()
 Returns true, if the VisualEditor is requested from the inputbox wikitext definition and if the VisualEditor extension is actually installed or not, false otherwise. More...
 

Private Attributes

 $mBGColor = 'transparent'
 
 $mBR = 'yes'
 
 $mButtonLabel = ''
 
 $mDefaultText = ''
 
 $mDir = ''
 
 $mEditIntro = null
 
 $mFullTextButton = ''
 
 $mHidden = ''
 
 $mID = ''
 
 $mInline = false
 
 $mLabelText = ''
 
 $mMinor = null
 
 $mNamespaces = ''
 
 $mNosummary = null
 
 $mPage = ''
 
 $mParser
 
 $mPlaceholderText = ''
 
 $mPrefix = ''
 
 $mPreload = null
 
 $mPreloadparams = null
 
 $mSearchButtonLabel = ''
 
 $mSearchFilter = ''
 
 $mSummary = null
 
 $mTour = ''
 
 $mType = ''
 
 $mUseVE = null
 
 $mWidth = 50
 

Detailed Description

Definition at line 10 of file InputBox.classes.php.

Member Function Documentation

◆ __construct()

InputBox::__construct (   $parser)

Definition at line 44 of file InputBox.classes.php.

References $parser.

◆ bgColorStyle()

InputBox::bgColorStyle ( )
private

◆ extractOptions()

InputBox::extractOptions (   $text)

Extract options from a blob of text.

Parameters
string$textTag contents

Definition at line 584 of file InputBox.classes.php.

References $line, $name, $options, $value, as, isValidColor(), languageConvert(), list, and true.

◆ getCommentForm()

InputBox::getCommentForm ( )

◆ getCreateForm()

InputBox::getCreateForm ( )

◆ getEditActionArgs()

InputBox::getEditActionArgs ( )
private

Definition at line 94 of file InputBox.classes.php.

References $args, and shouldUseVE().

Referenced by getCommentForm(), and getCreateForm().

◆ getLinebreakClasses()

InputBox::getLinebreakClasses ( )
private

Get common classes, that could be added and depend on, if a line break between a button and an input field is added or not.

Returns
String

Definition at line 116 of file InputBox.classes.php.

Referenced by getCommentForm(), getCreateForm(), getMoveForm(), and getSearchForm().

◆ getMoveForm()

InputBox::getMoveForm ( )

◆ getSearchForm()

InputBox::getSearchForm (   $type)

◆ getSearchForm2()

InputBox::getSearchForm2 ( )

Generate search form version 2.

Definition at line 292 of file InputBox.classes.php.

References $mID, $mLabelText, bgColorStyle(), Xml::closeElement(), Xml::element(), SpecialPage::getTitleFor(), Xml::openElement(), wfMessage(), and wfRandom().

Referenced by render().

◆ isValidColor()

InputBox::isValidColor (   $color)

Do a security check on the bgcolor parameter.

Definition at line 666 of file InputBox.classes.php.

References a, color, and names.

Referenced by extractOptions().

◆ languageConvert()

InputBox::languageConvert (   $text)
private

For compatability with pre T119158 behaviour.

If a field that is going to be used as an attribute and it contains "-{" in it, run it through language converter.

Its not really clear if it would make more sense to always convert instead of only if -{ is present. This function just more or less restores the previous accidental behaviour.

See also
https://phabricator.wikimedia.org/T180485

Definition at line 712 of file InputBox.classes.php.

References $lang, and false.

Referenced by extractOptions().

◆ render()

◆ shouldUseVE()

InputBox::shouldUseVE ( )
private

Returns true, if the VisualEditor is requested from the inputbox wikitext definition and if the VisualEditor extension is actually installed or not, false otherwise.

Returns
bool

Definition at line 694 of file InputBox.classes.php.

References ExtensionRegistry::getInstance().

Referenced by getEditActionArgs().

Member Data Documentation

◆ $mBGColor

InputBox::$mBGColor = 'transparent'
private

Definition at line 28 of file InputBox.classes.php.

◆ $mBR

InputBox::$mBR = 'yes'
private

Definition at line 25 of file InputBox.classes.php.

Referenced by getCommentForm(), getCreateForm(), getMoveForm(), and getSearchForm().

◆ $mButtonLabel

InputBox::$mButtonLabel = ''
private

Definition at line 29 of file InputBox.classes.php.

◆ $mDefaultText

InputBox::$mDefaultText = ''
private

Definition at line 26 of file InputBox.classes.php.

◆ $mDir

InputBox::$mDir = ''
private

Definition at line 38 of file InputBox.classes.php.

◆ $mEditIntro

InputBox::$mEditIntro = null
private

Definition at line 19 of file InputBox.classes.php.

◆ $mFullTextButton

InputBox::$mFullTextButton = ''
private

Definition at line 31 of file InputBox.classes.php.

◆ $mHidden

InputBox::$mHidden = ''
private

Definition at line 33 of file InputBox.classes.php.

◆ $mID

InputBox::$mID = ''
private

Definition at line 35 of file InputBox.classes.php.

Referenced by getSearchForm2().

◆ $mInline

InputBox::$mInline = false
private

Definition at line 36 of file InputBox.classes.php.

◆ $mLabelText

InputBox::$mLabelText = ''
private

Definition at line 32 of file InputBox.classes.php.

Referenced by getSearchForm2().

◆ $mMinor

InputBox::$mMinor = null
private

Definition at line 23 of file InputBox.classes.php.

◆ $mNamespaces

InputBox::$mNamespaces = ''
private

Definition at line 34 of file InputBox.classes.php.

◆ $mNosummary

InputBox::$mNosummary = null
private

Definition at line 22 of file InputBox.classes.php.

◆ $mPage

InputBox::$mPage = ''
private

Definition at line 24 of file InputBox.classes.php.

◆ $mParser

InputBox::$mParser
private

Definition at line 14 of file InputBox.classes.php.

◆ $mPlaceholderText

InputBox::$mPlaceholderText = ''
private

Definition at line 27 of file InputBox.classes.php.

◆ $mPrefix

InputBox::$mPrefix = ''
private

Definition at line 37 of file InputBox.classes.php.

◆ $mPreload

InputBox::$mPreload = null
private

Definition at line 17 of file InputBox.classes.php.

◆ $mPreloadparams

InputBox::$mPreloadparams = null
private

Definition at line 18 of file InputBox.classes.php.

◆ $mSearchButtonLabel

InputBox::$mSearchButtonLabel = ''
private

Definition at line 30 of file InputBox.classes.php.

◆ $mSearchFilter

InputBox::$mSearchFilter = ''
private

Definition at line 39 of file InputBox.classes.php.

◆ $mSummary

InputBox::$mSummary = null
private

Definition at line 21 of file InputBox.classes.php.

◆ $mTour

InputBox::$mTour = ''
private

Definition at line 40 of file InputBox.classes.php.

◆ $mType

InputBox::$mType = ''
private

Definition at line 15 of file InputBox.classes.php.

◆ $mUseVE

InputBox::$mUseVE = null
private

Definition at line 20 of file InputBox.classes.php.

◆ $mWidth

InputBox::$mWidth = 50
private

Definition at line 16 of file InputBox.classes.php.


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