Overview

Packages

  • Actions
  • Codegen
  • Controls
    • Base
  • DatabaseAdapters
  • Events
  • None
  • Sessions
  • Tests

Classes

  • QAccordionBase
  • QAccordionGen
  • QAutocompleteBase
  • QAutocompleteGen
  • QDatepickerBase
  • QDatepickerBoxBase
  • QDatepickerBoxGen
  • QDatepickerGen
  • QDialogBase
  • QDialogGen
  • QDraggableBase
  • QDraggableGen
  • QDroppableBase
  • QDroppableGen
  • QFieldset
  • QJqButtonBase
  • QJqButtonGen
  • QJqCheckBoxBase
  • QJqCheckBoxGen
  • QJqRadioButtonBase
  • QJqRadioButtonGen
  • QMenuBase
  • QMenuGen
  • QProgressbarBase
  • QProgressbarGen
  • QResizableBase
  • QResizableGen
  • QSelectableBase
  • QSelectableGen
  • QSelectMenu
  • QSelectMenuBase
  • QSelectMenuGen
  • QSliderBase
  • QSliderGen
  • QSortableBase
  • QSortableGen
  • QSpinnerBase
  • QSpinnerGen
  • QTabsBase
  • QTabsGen
  • QTextBoxBase
  • Overview
  • Package
  • Class

Class QTextBoxBase

This class will render an HTML Textbox -- which can either be [input type="text"], [input type="password"] or [textarea] depending on the TextMode (see below).

QBaseClass
Extended by QHtmlAttributeManagerBase
Extended by QHtmlAttributeManager
Extended by QControlBase
Extended by QControl
Extended by QTextBoxBase

Direct known subclasses

QTextBox

Indirect known subclasses

QAutocomplete, QAutocompleteBase, QFloatTextBox, QIntegerTextBox, QNumericTextBox, QSpinner, QSpinnerBase, QSpinnerGen, QUrlTextBox, QWriteBox, QAutocompleteGen, QCalendar, QCsvTextBox, QDatepickerBox, QDatepickerBoxBase, QDatepickerBoxGen, QDateTimeTextBox, QEmailTextBox
Abstract
Package: Controls\Base
Located at includes/base_controls/QTextBoxBase.class.php
Methods summary
public
# __construct( QControl|QForm $objParentObject, null|string $strControlId = null )

Constructor for the QTextBox[Base]

Constructor for the QTextBox[Base]

Parameters

$objParentObject
$strControlId

Throws

Exception|QCallerException

Overrides

QControlBase::__construct()
protected
# InitHtmlPurifier( )

Initializee the HtmlPurifier library.

Initializee the HtmlPurifier library.

public
# SetPurifierConfig( strParameter $strParameter, mixValue $mixValue )

This function allows to set the Configuration for HTMLPurifier similar to the HTMLPurifierConfig::set() method from the HTMLPurifier API.

This function allows to set the Configuration for HTMLPurifier similar to the HTMLPurifierConfig::set() method from the HTMLPurifier API.

Parameters

$strParameter
The parameter to set for HTMLPurifier
$mixValue

Value of the parameter. NOTE: THERE IS NO SUPPORT FOR THE DEPRECATED API OF HTMLPURIFIER, HENCE NO THIRD ARGUMENT TO THE FUNCTION CAN BE PASSED. Visit http://htmlpurifier.org/live/configdoc/plain.html for the list of parameters and their effects.

public
# ParsePostData( )

Parse the data posted back via the control. This function basically test for the Crossscripting rules applied to the QTextBox

Parse the data posted back via the control. This function basically test for the Crossscripting rules applied to the QTextBox

Throws

QCrossScriptingException
protected
# Sanitize( )

Sanitizes the current value.

Sanitizes the current value.

protected string
# GetControlHtml( )

Returns the HTML formatted string for the control

Returns the HTML formatted string for the control

Returns

string
HTML string
public string|
# RenderHtmlAttributes( null $attributeOverrides = null, null $styleOverrides = null )

Render HTML attributes for the purpose of drawing the tag. Text objects have a number of parameters specific to them, some of which we use for validation, and some of which are dual purpose. We render those here, rather than setting the attributes when those are set.

Render HTML attributes for the purpose of drawing the tag. Text objects have a number of parameters specific to them, some of which we use for validation, and some of which are dual purpose. We render those here, rather than setting the attributes when those are set.

Parameters

$attributeOverrides
$styleOverrides

Returns

string|

Overrides

QControlBase::RenderHtmlAttributes()
public boolean
# Validate( )

Tests that the value given inside the textbox passes the rules set for the input Tests it does: (1) Checks if the textbox was empty while 'Required' property was set to true (2) Checks for length contrainsts set by 'MaxLength' and 'MinLength' properties

Tests that the value given inside the textbox passes the rules set for the input Tests it does: (1) Checks if the textbox was empty while 'Required' property was set to true (2) Checks for length contrainsts set by 'MaxLength' and 'MinLength' properties

Returns

boolean
whether or not the control is valid
public
# Select( )

This will focus on and do a "select all" on the contents of the textbox

This will focus on and do a "select all" on the contents of the textbox

protected mixed
# GetState( )

Returns the current state of the control to be able to restore it later.

Returns the current state of the control to be able to restore it later.

Returns

mixed

Overrides

QControlBase::GetState()
protected
# PutState( mixed $state )

Restore the state of the control.

Restore the state of the control.

Parameters

$state
Previously saved state as returned by GetState above.

Overrides

QControlBase::PutState()
public array|boolean|integer|mixed|null|QControl|QForm|string
# __get( string $strName )

PHP __get magic method implementation

PHP __get magic method implementation

Parameters

$strName
Name of the property

Returns

array|boolean|integer|mixed|null|QControl|QForm|string

Throws

Exception|QCallerException

Overrides

QControlBase::__get()
public mixed
# __set( string $strName, string $mixValue )

PHP __set magic method implementation

PHP __set magic method implementation

Parameters

$strName
Name of the property
$mixValue
Value of the property

Returns

mixed

Throws

Exception|QCallerException|QInvalidCastException

Overrides

QControlBase::__set()
public static QModelConnectorParam[]
# GetModelConnectorParams( )

Returns an description of the options available to modify by the designer for the code generator.

Returns an description of the options available to modify by the designer for the code generator.

Returns

QModelConnectorParam[]

Overrides

QControlBase::GetModelConnectorParams()
Methods inherited from QControlBase
AddAction(), AddActionArray(), AddAttributeScript(), AddChildControl(), AddCssFile(), AddJavascriptFile(), AddPluginCssFile(), AddPluginJavascriptFile(), AddWrapperCssClass(), Blink(), EvaluateTemplate(), Focus(), ForgetState(), GetAllActions(), GetAttributes(), GetChildControl(), GetChildControls(), GetControlFromHierarchyByMethodName(), GetCustomAttribute(), GetCustomAttributes(), GetCustomStyle(), GetEndHtml(), GetEndScript(), GetForm(), GetJavaScriptForEvent(), GetJqControlId(), GetNonWrappedHtml(), GetStyleAttributes(), GetTemplatePath(), GetWrapperAttributes(), GetWrapperStyleAttributes(), GetWrapperStyler(), IsDescendantOf(), IsModified(), MakeCurrent(), MarkAsModified(), MarkAsRendered(), MarkAsWrapperModified(), ProcessActionParameters(), Refresh(), RemoveAllActions(), RemoveChildControl(), RemoveChildControls(), RemoveCustomAttribute(), RemoveCustomStyle(), RemoveWrapperCssClass(), Render(), RenderActionScripts(), RenderAjax(), RenderAttributeScripts(), RenderChildren(), RenderComment(), RenderCssStyles(), RenderExtensionRenderer(), RenderHelper(), RenderOutput(), RenderWithError(), RenderWithName(), RenderWrappedOutput(), ResetFlags(), ResetOnPageStatus(), SetCustomAttribute(), SetCustomStyle(), SetFocus(), SetForm(), SetParentControl(), Sleep(), SleepHelper(), ValidateControlAndChildren(), ValidationReset(), VarExport(), Wakeup(), WakeupHelper(), Watch(), _CallActionMethod(), _ProcessActionParams(), _ReadState(), _WriteState()
Methods inherited from QHtmlAttributeManagerBase
AddCssClass(), GetCssStyle(), GetDataAttribute(), GetHtmlAttribute(), GetHtmlAttributes(), HasCssClass(), HasCssStyle(), HasHtmlAttribute(), Override(), RemoveCssClass(), RemoveCssClassesByPrefix(), RemoveCssStyle(), RemoveDataAttribute(), RemoveHtmlAttribute(), RenderTag(), SetCssBoxValue(), SetCssClass(), SetCssStyle(), SetDataAttribute(), SetHtmlAttribute()
Methods inherited from QBaseClass
OverrideAttributes(), __call()
Constants inherited from QControlBase
CommentEnd, CommentStart
Properties summary
protected integer $intColumns
# 0
protected string $strText
# null
protected string $strLabelForRequired
#
protected string $strLabelForRequiredUnnamed
#
protected string $strLabelForTooShort
#
protected string $strLabelForTooShortUnnamed
#
protected string $strLabelForTooLong
#
protected string $strLabelForTooLongUnnamed
#
protected string $strPlaceholder
# ''
protected string $strFormat
# '%s'
protected integer $intMaxLength
# 0
protected integer $intMinLength
# 0
protected integer $intRows
# 0
protected string $strTextMode

Subclasses should not set this directly, but rather use the TextMode accessor

Subclasses should not set this directly, but rather use the TextMode accessor

# QTextMode::SingleLine
protected string $strCrossScripting
#
protected null $objHTMLPurifierConfig
# null
protected boolean $blnAutoTrim
# false
protected integer $intSanitizeFilter
# null
protected mixed $mixSanitizeFilterOptions
# null
protected integer $intValidateFilter
# null
protected mixed $mixValidateFilterOptions
# null
protected string $strLabelForInvalid
# null
Properties inherited from QControlBase
$blnActionsMustTerminate, $blnAutoRender, $blnDisplay, $blnIsBlockElement, $blnMinimize, $blnModified, $blnOnPage, $blnRendered, $blnRendering, $blnRequired, $blnSaveState, $blnScriptsOnly, $blnUseWrapper, $blnVisible, $blnWrapLabel, $blnWrapperModified, $mixActionParameter, $mixCausesValidation, $objActionArray, $objChildControlArray, $objDraggable, $objDroppable, $objForm, $objLinkedNode, $objParentControl, $objResizable, $objWatcher, $objWrapperStyler, $strAttributeScripts, $strControlId, $strCssClass, $strCustomAttributeArray, $strCustomStyleArray, $strFormAttributes, $strHtmlAfter, $strHtmlBefore, $strInstructions, $strJavaScripts, $strName, $strPreferredRenderMethod, $strRenderMethod, $strStyleSheets, $strValidationError, $strWarning
Properties inherited from QHtmlAttributeManagerBase
$attributes, $styles
Magic properties summary
public integer $Columns

is the "cols" html attribute (applicable for MultiLine textboxes)

public string $Format
public string $Text

is the contents of the textbox, itself

public string|null $Value

Returns the value of the text. If the text is empty, will return null. Subclasses can use this to return a specific type of data.

public string $LabelForRequired
public string $LabelForRequiredUnnamed
public string $LabelForTooShort
public string $LabelForTooShortUnnamed
public string $LabelForTooLong
public string $LabelForTooLongUnnamed
public string $Placeholder

HTML5 Only. Placeholder text that gets erased once a user types.

public string $CrossScripting

can be Allow, HtmlEntities, or Deny. Deny is the default. Prevents cross scripting hacks. HtmlEntities causes framework to automatically call php function htmlentities on the input data. Allow allows everything to come through without altering at all. USE "ALLOW" judiciously: using ALLOW on text entries, and then outputting that data WILL allow hackers to perform cross scripting hacks.

public integer $MaxLength

is the "maxlength" html attribute (applicable for SingleLine textboxes)

public integer $MinLength

is the minimum requred length to pass validation

public integer $Rows

is the "rows" html attribute (applicable for MultiLine textboxes)

public string $TextMode

a QTextMode item. Determines if its a single or multi-line textbox, and the "type" property of the input.

public boolean $AutoTrim

to automatically remove white space from beginning and end of data

public integer $SanitizeFilter

PHP filter constant to apply to incoming data

public mixed $SanitizeFilterOptions

PHP filter constants or array to apply to SanitizeFilter option

public integer $ValidateFilter

PHP filter constant to apply to validate with

public mixed $ValidateFilterOptions

PHP filter constants or array to apply to ValidateFilter option

public mixed $LabelForInvalid

PHP filter constants or array to apply to ValidateFilter option

Magic properties inherited from QControlBase
$ActionParameter, $ActionsMustTerminate, $AutoRender, $CausesValidation, $ControlId, $Form, $FormAttributes, $HtmlAfter, $HtmlBefore, $Instructions, $JavaScripts, $LinkedNode, $Minimize, $Modified, $Moveable, $Name, $OnPage, $ParentControl, $PreferredRenderMethod, $RenderMethod, $Rendered, $Rendering, $Required, $Resizable, $SaveState, $ScriptsOnly, $StyleSheets, $UseWrapper, $ValidationError, $Visible, $Warning, $WrapLabel, $WrapperCssClass, $WrapperModified
Magic properties inherited from QHtmlAttributeManagerBase
$AccessKey, $AltText, $BackColor, $BorderCollapse, $BorderColor, $BorderStyle, $BorderWidth, $CssClass, $Cursor, $Data, $Display, $DisplayStyle, $Enabled, $FontBold, $FontItalic, $FontNames, $FontOverline, $FontSize, $FontStrikeout, $FontUnderline, $ForeColor, $Height, $HorizontalAlign, $Left, $Margin, $NoWrap, $Opacity, $OrderedListType, $Overflow, $Padding, $Position, $ReadOnly, $TabIndex, $ToolTip, $Top, $UnorderedListStyle, $VerticalAlign, $Width
API documentation generated by ApiGen