PHP Class QControlBase, qcodo

Please note that not every control will utilize every single one of these properties. Keep in mind that Controls that are not Enabled or not Visible will not go through the form's Validation routine. All Controls must implement the following abstract functions:
  • {@link QControlBase::GetControlHtml()}
  • {@link QControlBase::ParsePostData()}
  • {@link QControlBase::Validate()}
Inheritance: extends QBaseClass
显示文件 Open project: qcodo/qcodo Class Usage Examples

Protected Properties

Property Type Description
$blnActionsMustTerminate
$blnDisplay
$blnEnabled
$blnFontBold
$blnFontItalic
$blnFontOverline
$blnFontStrikeout
$blnFontUnderline
$blnIsBlockElement
$blnModified
$blnMoveable
$blnOnPage
$blnRendered
$blnRendering
$blnRequired
$blnVisible
$blnWrapperModified
$intOpacity
$intTabIndex
$mixCausesValidation
$objActionArray
$objChildControlArray
$objForm
$objParentControl
$strAccessKey BEHAVIOR
$strActionParameter
$strBackColor APPEARANCE
$strBorderColor
$strBorderStyle
$strBorderWidth
$strControlId MISC
$strCssClass
$strCursor
$strCustomAttributeArray
$strCustomStyleArray
$strDisplayStyle
$strFontNames
$strFontSize
$strForeColor
$strFormAttributes
$strHeight LAYOUT
$strHtmlAfter
$strHtmlBefore
$strInstructions
$strJavaScripts SETTINGS
$strLeft
$strName
$strOverflow
$strPosition
$strRenderMethod
$strStyleSheets
$strToolTip
$strTop
$strValidationError
$strWarning
$strWidth

Public Methods

Method Description
AddAction ( $objEvent, $objAction )
AddActionArray ( $objEvent, $objActionArray )
AddChildControl ( QControl $objControl )
AddCssClass ( string $strCssClassName ) This will add a CssClass name to the CssClass property (if it does not yet exist), updating the CssClass property accordingly.
Blink ( $strFromColor = '#ffff66', $strToColor = '#ffffff' )
CountChildControls ( )
CreatePersistent ( $strClassName, $objParentObject, $strControlId )
Focus ( )
GetActionAttributes ( )
GetAllActions ( $strEventType, $strActionType = null )
GetAttributes ( $blnIncludeCustom = true, $blnIncludeAction = true ) (e.g. textbox will likely add the maxlength html attribute, etc.)
GetChildControl ( $strControlId )
GetChildControlIndex ( $strControlId )
GetChildControls ( $blnUseNumericIndexes = true )
GetCustomAttribute ( $strName )
GetCustomAttributes ( )
GetCustomStyle ( $strName )
GetEndHtml ( )
GetEndScript ( )
GetJavaScriptForEvent ( $strEventName )
GetStyleAttributes ( ) a control's HTML "style" attribute
MarkAsModified ( )
MarkAsRendered ( )
MarkAsWrapperModified ( )
MoveChildControlDown ( $strControlId )
MoveChildControlUp ( $strControlId )
MoveDownInParent ( )
MoveUpInParent ( )
ParsePostData ( ) $_POST data to update its own values/properties based on what was returned to via the postback.
Persist ( )
PrepForVarExport ( )
Refresh ( ) If not yet rendered during this server/ajax event, will force the control to redraw/refresh Otherwise, this will do nothing
RemoveAllActions ( string $strEventName ) Removes all events for a given event name.
RemoveChildControl ( $strControlId, $blnRemoveFromForm )
RemoveChildControls ( $blnRemoveFromForm )
RemoveCssClass ( string $strCssClassName ) This will remove a CssClass name from the CssClass property (if it exists), updating the CssClass property accordingly.
RemoveCustomAttribute ( $strName )
RemoveCustomStyle ( $strName )
Render ( $blnDisplayOutput = true ) it is by default), or it will return the rendered HTML as a string.
RenderAjax ( $blnDisplayOutput = true )
RenderWithError ( $blnDisplayOutput = true )
ResetFlags ( ) called by user code.
ResetOnPageStatus ( )
SetCustomAttribute ( $strName, $strValue )
SetCustomStyle ( $strName, $strValue )
SetFocus ( )
SetForm ( $objForm )
SetParentControl ( $objControl )
Validate ( ) have Validate() return true.
ValidationReset ( )
__construct ( $objParentObject, $strControlId = null )
__get ( $strName )
__set ( $strName, $mixValue )

Protected Methods

Method Description
GetControlHtml ( ) This method will render the control, itself, and will return the rendered HTML as a string
GetNonWrappedHtml ( )
PersistPrepare ( )
RenderChildren ( $blnDisplayOutput = true )
RenderHelper ( $mixParameterArray, $strRenderMethod ) if ($this->RenderHelper(func_get_args())) return;
RenderOutput ( $strOutput, $blnDisplayOutput, $blnForceAsBlockElement = false )

Method Details

AddAction() public method

public AddAction ( $objEvent, $objAction )

AddActionArray() public method

public AddActionArray ( $objEvent, $objActionArray )

AddChildControl() public method

public AddChildControl ( QControl $objControl )
$objControl QControl

AddCssClass() public method

This will add a CssClass name to the CssClass property (if it does not yet exist), updating the CssClass property accordingly.
public AddCssClass ( string $strCssClassName )
$strCssClassName string

CountChildControls() public method

public CountChildControls ( )

CreatePersistent() public static method

public static CreatePersistent ( $strClassName, $objParentObject, $strControlId )

Focus() public method

public Focus ( )

GetActionAttributes() public method

public GetActionAttributes ( )

GetAllActions() public method

public GetAllActions ( $strEventType, $strActionType = null )

GetAttributes() public method

(e.g. textbox will likely add the maxlength html attribute, etc.)
public GetAttributes ( $blnIncludeCustom = true, $blnIncludeAction = true )

GetChildControl() public method

public GetChildControl ( $strControlId )

GetChildControlIndex() public method

public GetChildControlIndex ( $strControlId )

GetChildControls() public method

public GetChildControls ( $blnUseNumericIndexes = true )

GetControlHtml() abstract protected method

This method will render the control, itself, and will return the rendered HTML as a string
abstract protected GetControlHtml ( )

GetCustomAttribute() public method

public GetCustomAttribute ( $strName )

GetCustomAttributes() public method

public GetCustomAttributes ( )

GetCustomStyle() public method

public GetCustomStyle ( $strName )

GetEndHtml() public method

public GetEndHtml ( )

GetEndScript() public method

public GetEndScript ( )

GetJavaScriptForEvent() public method

public GetJavaScriptForEvent ( $strEventName )

GetNonWrappedHtml() protected method

protected GetNonWrappedHtml ( )

GetStyleAttributes() public method

a control's HTML "style" attribute
public GetStyleAttributes ( )

MarkAsModified() public method

public MarkAsModified ( )

MarkAsRendered() public method

public MarkAsRendered ( )

MarkAsWrapperModified() public method

MoveChildControlDown() public method

public MoveChildControlDown ( $strControlId )

MoveChildControlUp() public method

public MoveChildControlUp ( $strControlId )

MoveDownInParent() public method

public MoveDownInParent ( )

MoveUpInParent() public method

public MoveUpInParent ( )

ParsePostData() abstract public method

$_POST data to update its own values/properties based on what was returned to via the postback.
abstract public ParsePostData ( )

Persist() public method

public Persist ( )

PersistPrepare() protected method

protected PersistPrepare ( )

PrepForVarExport() public method

public PrepForVarExport ( )

Refresh() public method

If not yet rendered during this server/ajax event, will force the control to redraw/refresh Otherwise, this will do nothing
public Refresh ( )

RemoveAllActions() public method

Be sure and use a QFooEvent::EventName constant here.
public RemoveAllActions ( string $strEventName )
$strEventName string

RemoveChildControl() public method

public RemoveChildControl ( $strControlId, $blnRemoveFromForm )

RemoveChildControls() public method

public RemoveChildControls ( $blnRemoveFromForm )

RemoveCssClass() public method

This will remove a CssClass name from the CssClass property (if it exists), updating the CssClass property accordingly.
public RemoveCssClass ( string $strCssClassName )
$strCssClassName string

RemoveCustomAttribute() public method

public RemoveCustomAttribute ( $strName )

RemoveCustomStyle() public method

public RemoveCustomStyle ( $strName )

Render() public method

it is by default), or it will return the rendered HTML as a string.
public Render ( $blnDisplayOutput = true )

RenderAjax() public method

public RenderAjax ( $blnDisplayOutput = true )

RenderChildren() protected method

protected RenderChildren ( $blnDisplayOutput = true )

RenderHelper() protected method

if ($this->RenderHelper(func_get_args())) return;
protected RenderHelper ( $mixParameterArray, $strRenderMethod )

RenderOutput() protected method

protected RenderOutput ( $strOutput, $blnDisplayOutput, $blnForceAsBlockElement = false )

RenderWithError() public method

public RenderWithError ( $blnDisplayOutput = true )

ResetFlags() public method

called by user code.
public ResetFlags ( )

ResetOnPageStatus() public method

public ResetOnPageStatus ( )

SetCustomAttribute() public method

..... onfocus="alert('You are about to edit this field')" nowrap="nowrap" blah="foo" />
public SetCustomAttribute ( $strName, $strValue )

SetCustomStyle() public method

public SetCustomStyle ( $strName, $strValue )

SetFocus() public method

public SetFocus ( )

SetForm() public method

public SetForm ( $objForm )

SetParentControl() public method

public SetParentControl ( $objControl )

Validate() abstract public method

have Validate() return true.
abstract public Validate ( )

ValidationReset() public method

public ValidationReset ( )

__construct() public method

public __construct ( $objParentObject, $strControlId = null )

__get() public method

public __get ( $strName )

__set() public method

public __set ( $strName, $mixValue )

Property Details

$blnActionsMustTerminate protected_oe property

protected $blnActionsMustTerminate

$blnDisplay protected_oe property

protected $blnDisplay

$blnEnabled protected_oe property

protected $blnEnabled

$blnFontBold protected_oe property

protected $blnFontBold

$blnFontItalic protected_oe property

protected $blnFontItalic

$blnFontOverline protected_oe property

protected $blnFontOverline

$blnFontStrikeout protected_oe property

protected $blnFontStrikeout

$blnFontUnderline protected_oe property

protected $blnFontUnderline

$blnIsBlockElement protected_oe property

protected $blnIsBlockElement

$blnModified protected_oe property

protected $blnModified

$blnMoveable protected_oe property

protected $blnMoveable

$blnOnPage protected_oe property

protected $blnOnPage

$blnRendered protected_oe property

protected $blnRendered

$blnRendering protected_oe property

protected $blnRendering

$blnRequired protected_oe property

protected $blnRequired

$blnVisible protected_oe property

protected $blnVisible

$blnWrapperModified protected_oe property

protected $blnWrapperModified

$intOpacity protected_oe property

protected $intOpacity

$intTabIndex protected_oe property

protected $intTabIndex

$mixCausesValidation protected_oe property

protected $mixCausesValidation

$objActionArray protected_oe property

protected $objActionArray

$objChildControlArray protected_oe property

protected $objChildControlArray

$objForm protected_oe property

protected $objForm

$objParentControl protected_oe property

protected $objParentControl

$strAccessKey protected_oe property

BEHAVIOR
protected $strAccessKey

$strActionParameter protected_oe property

protected $strActionParameter

$strBackColor protected_oe property

APPEARANCE
protected $strBackColor

$strBorderColor protected_oe property

protected $strBorderColor

$strBorderStyle protected_oe property

protected $strBorderStyle

$strBorderWidth protected_oe property

protected $strBorderWidth

$strControlId protected_oe property

MISC
protected $strControlId

$strCssClass protected_oe property

protected $strCssClass

$strCursor protected_oe property

protected $strCursor

$strCustomAttributeArray protected_oe property

protected $strCustomAttributeArray

$strCustomStyleArray protected_oe property

protected $strCustomStyleArray

$strDisplayStyle protected_oe property

protected $strDisplayStyle

$strFontNames protected_oe property

protected $strFontNames

$strFontSize protected_oe property

protected $strFontSize

$strForeColor protected_oe property

protected $strForeColor

$strFormAttributes protected_oe property

protected $strFormAttributes

$strHeight protected_oe property

LAYOUT
protected $strHeight

$strHtmlAfter protected_oe property

protected $strHtmlAfter

$strHtmlBefore protected_oe property

protected $strHtmlBefore

$strInstructions protected_oe property

protected $strInstructions

$strJavaScripts protected_oe property

SETTINGS
protected $strJavaScripts

$strLeft protected_oe property

protected $strLeft

$strName protected_oe property

protected $strName

$strOverflow protected_oe property

protected $strOverflow

$strPosition protected_oe property

protected $strPosition

$strRenderMethod protected_oe property

protected $strRenderMethod

$strStyleSheets protected_oe property

protected $strStyleSheets

$strToolTip protected_oe property

protected $strToolTip

$strTop protected_oe property

protected $strTop

$strValidationError protected_oe property

protected $strValidationError

$strWarning protected_oe property

protected $strWarning

$strWidth protected_oe property

protected $strWidth