Overview

Packages

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

Classes

  • BasicForm
  • CalculatorWidget
  • DataRepeaterExample
  • ExampleCheckColumn1
  • ExampleCheckColumn2
  • ExampleSingleForm
  • NestedTabForm
  • PaginatorForm
  • ParamsForm
  • PersistentExampleForm
  • PersonEditPanel
  • PluginEditForm
  • PluginManagerForm
  • ProjectEditPanel
  • ProjectListForm
  • ProjectViewPanel
  • QAccordion
  • QActionControl
  • QAutocomplete
  • QBlockControl
  • QButton
  • QButtonBase
  • QCalendar
  • QCheckBox
  • QCheckBoxLegacyColumn
  • QCheckBoxList
  • QControl
  • QControlBase
  • QControlGrouping
  • QControlLabel
  • QCsvTextBox
  • QDataGrid
  • QDataGrid_CheckBoxColumn
  • QDataGrid_SortEvent
  • QDataGridBase
  • QDataGridLegacy
  • QDataGridLegacyBase
  • QDataGridLegacyColumn
  • QDataGridLegacyRow
  • QDataGridLegacyRowStyle
  • QDataRepeater
  • QDatepicker
  • QDatepickerBox
  • QDateTimePicker
  • QDateTimeTextBox
  • QDialog
  • QDialogBox
  • QDraggable
  • QDroppable
  • QDropZoneGrouping
  • QEmailTextBox
  • QFileAsset
  • QFileAssetBase
  • QFileAssetDialog
  • QFileControl
  • QFilterType
  • QFloatTextBox
  • QFontFamily
  • QForm
  • QFormBase
  • QHListItem
  • QHtmlAttributeManager
  • QHtmlAttributeManagerBase
  • QHtmlTable
  • QHtmlTableBase
  • QImageBase
  • QImageBrowser
  • QImageBrowserBase
  • QImageBrowserNav
  • QImageBrowserThumbnails
  • QImageButton
  • QImageControl
  • QImageControlBase
  • QImageFileAsset
  • QImageLabel
  • QImageLabelBase
  • QImageRollover
  • QIntegerTextBox
  • QJqButton
  • QJqCheckBox
  • QJqRadioButton
  • QJsTimer
  • QJsTimerBase
  • QLabel
  • QLinkButton
  • QListBox
  • QListBoxBase
  • QListControl
  • QListItem
  • QListItemBase
  • QListItemStyle
  • QNumericTextBox
  • QPaginatedControl
  • QPaginator
  • QPaginatorBase
  • QPanel
  • QProgressbar
  • QRadioButton
  • QRadioButtonList
  • QResizable
  • QSampleControl
  • QSelectable
  • QSlider
  • QSortable
  • QTabs
  • QTagStyler
  • QTestControl
  • QTextBox
  • QTimerExpiredEvent
  • QTreeNav
  • QTreeNavItem
  • QUrlTextBox
  • QWaitIcon
  • QWriteBox
  • RecordsSummary
  • RefreshForm
  • SampleForm
  • SelectableLabel
  • SpeedForm
  • TestImageBrowser
  • UrlForm

Traits

  • QListItemManager

Exceptions

  • QCrossScriptingException

Functions

  • __QForm_EvaluateTemplate_ObHandler
  • DataGridEvalHandleError
  • Overview
  • Package
  • Class

Class QHtmlTableBase

<

p>This control is used to display a simple html table.

The control itself will display things based off of an array of objects that gets set as the "Data Source". It is particularly useful when combined with the Class::LoadArrayByXXX() functions or the Class::LoadAll() that is generated by the CodeGen framework, or when combined with custom Class ArrayLoaders that you define youself, but who's structure is based off of the CodeGen framework.

For each item in a datasource's Array, a row (<tr>) will be generated. You can define any number of QHtmlTableColumns which will result in a <td> for each row. Using the QHtmlTableColumn's Accessor property, you can specify how the data for each cell should be fetched from the datasource.

QBaseClass
Extended by QHtmlAttributeManagerBase
Extended by QHtmlAttributeManager
Extended by QControlBase
Extended by QControl
Extended by QPaginatedControl uses QDataBinder
Extended by QHtmlTableBase

Direct known subclasses

QHtmlTable

Indirect known subclasses

QDataGrid, QDataGridBase
Abstract
Package: Controls
Throws: QCallerException
Located at includes/base_controls/QHtmlTableBase.class.php
> and <> tags

Returns the HTML for the header row, including the <

> and <> tags

> tag.

Returns a key=>val array of parameters to insert inside of the header row's <

> tag.

Returns

array
> to the closing <> inclusive

Get the html for the row, from the opening <

> to the closing <> inclusive

Parameters

$objObject
Current object from the DataSource array
$intCurrentRowIndex

Current visual row index being output. This is NOT the index of the data source, only the visual row number currently on screen.

Returns

string

Throws

Exception
QCallerException
> tag for this row.

Returns a key/val array of params that will be inserted inside the <

> tag for this row.

Handles class, style, and id by default. Override to add additional types of parameters, like an 'onclick' paramater for example. No checking is done on these params, the raw strings are output.

Parameters

$objObject
The object of data being used as the row.
$intCurrentRowIndex

Returns

array
Array of key/value pairs that will be used as attributes for the row tag.
Methods summary
public
# __construct( QControl|QControlBase|QForm $objParentObject, null $strControlId = null )

Constructor method

Constructor method

Parameters

$objParentObject
$strControlId

Throws

Exception
QCallerException

Overrides

QPaginatedControl::__construct()
public
# ParsePostData( )

Nothing to parse in current implementation

Nothing to parse in current implementation

public QHtmlTableIndexedColumn
# CreateIndexedColumn( string $strName = '', mixed $mixIndex = null, integer $intColumnIndex = -1 )

Add an Index column and return it. Index columns assume that each data item is an array, and mixIndex is an offset in the array.

Add an Index column and return it. Index columns assume that each data item is an array, and mixIndex is an offset in the array.

Parameters

$strName
column name
$mixIndex
the index to use to access the cell date. i.e. $item[$index]
$intColumnIndex
column position

Returns

QHtmlTableIndexedColumn
public QHtmlTablePropertyColumn
# CreatePropertyColumn( string $strName, string $strProperty, integer $intColumnIndex = -1, object $objBaseNode = null )

Add a property column and return it. The assumption is that each row's data is an object.

Add a property column and return it. The assumption is that each row's data is an object.

Parameters

$strName
name of column
$strProperty
property to use to get the cell data. i.e. $item->$property
$intColumnIndex
column position
$objBaseNode
a query node from which the property descends, if you are using the sorting capabilities

Returns

QHtmlTablePropertyColumn
public QHtmlTableNodeColumn
# CreateNodeColumn( string $strName, mixed $objNodes, integer $intColumnIndex = -1 )

Parameters

$strName
$objNodes
$intColumnIndex

Returns

QHtmlTableNodeColumn

Throws

Exception
QInvalidCastException
public QHtmlTableCallableColumn
# CreateCallableColumn( string $strName, callable|array $objCallable, integer $intColumnIndex = -1 )

Add a callable column and return it.

Add a callable column and return it.

Parameters

$strName
column name
$objCallable
a callable object. Note that this can be an array.
$intColumnIndex
column position

Returns

QHtmlTableCallableColumn
public QVirtualAttributeColumn
# CreateVirtualAttributeColumn( $strName, $strAttribute, $intColumnIndex = -1 )

Add a virtual attribute column.

Add a virtual attribute column.

Parameters

$strName
$strAttribute
$intColumnIndex

Returns

QVirtualAttributeColumn
public QHtmlTableLinkColumn
# CreateLinkColumn( string $strName, null|string|array $mixText, null|string|array|QControlProxy $mixDestination = null, null|string|array $getVars = null, null|array $tagAttributes = null, boolean $blnAsButton = false, integer $intColumnIndex = -1 )

Add a link column.

Add a link column.

Parameters

$strName
Column name to be displayed in the table header.
$mixText

The text to display as the label of the anchor, a callable callback to get the text, a string that represents a property chain or a multi-dimensional array, or an array that represents the same. Depends on what time of row item is passed.

$mixDestination

The text representing the destination of the anchor, a callable callback to get the destination, a string that represents a property chain or a multi-dimensional array, or an array that represents the same, or a QControlProxy. Depends on what type of row item is passed.

$getVars

An array of key=>value pairs to use as the GET variables in the link URL, or in the case of a QControlProxy, possibly a string to represent the action parameter. In either case, each item can be a property chain, an array index list, or a callable callback as specified above. If the destination is a QControlProxy, this would be what to use as the action parameter.

$tagAttributes

An array of key=>value pairs to use as additional attributes in the tag. For example, could be used to add a class or an id to each tag.

$blnAsButton
Only used if this is drawing a QControlProxy. Will draw the proxy as a button.
$intColumnIndex

Returns

QHtmlTableLinkColumn

Throws

QInvalidCastException
public QAbstractHtmlTableColumn
# MoveColumn( string $strName, integer $intColumnIndex = -1, string $strNewName = null )

Move the named column to the given position

Move the named column to the given position

Parameters

$strName
column name
$intColumnIndex
new position
$strNewName
new column name

Returns

QAbstractHtmlTableColumn
public QAbstractHtmlTableColumn
# RenameColumn( string $strOldName, string $strNewName )

Rename a named column

Rename a named column

Parameters

$strOldName
$strNewName

Returns

QAbstractHtmlTableColumn
public QAbstractHtmlTableColumn
# AddColumn( QAbstractHtmlTableColumn $objColumn )

Add a column to the end of the column array.

Add a column to the end of the column array.

Parameters

$objColumn

Returns

QAbstractHtmlTableColumn
public
# AddColumnAt( integer $intColumnIndex, QAbstractHtmlTableColumn $objColumn )

Add a column at the given position. All column adds bottle neck through here so that subclasses can reliably override the column add process if needed. Use AddColumn to add a column to the end.

Add a column at the given position. All column adds bottle neck through here so that subclasses can reliably override the column add process if needed. Use AddColumn to add a column to the end.

Parameters

$intColumnIndex
column position. -1 to add to the end.
$objColumn

Throws

QInvalidCastException
public QAbstractHtmlTableColumn
# RemoveColumn( integer $intColumnIndex )

Removes a column from the table

Removes a column from the table

Parameters

$intColumnIndex
0-based index of the column to remove

Returns

QAbstractHtmlTableColumn
the removed column

Throws

QIndexOutOfRangeException|QInvalidCastException
public
# RemoveColumnById( $strId )

Removes the column by column id. Assumes the ids are unique.

Removes the column by column id. Assumes the ids are unique.

Parameters

$strId
public QAbstractHtmlTableColumn
# RemoveColumnByName( string $strName )

Remove the first column that has the given name

Remove the first column that has the given name

Parameters

$strName
name of the column to remove

Returns

QAbstractHtmlTableColumn
the removed column or null of no column with the given name was found
public QAbstractHtmlTableColumn[]
# RemoveColumnsByName( string $strName )

Remove all the columns that have the given name

Remove all the columns that have the given name

Parameters

$strName
name of the columns to remove

Returns

QAbstractHtmlTableColumn[]
the array of columns removed
public QAbstractHtmlTableColumn[]
# RemoveColumns( string[] $strNamesArray )

Remove all the columns that have any of the names in $strNamesArray

Remove all the columns that have any of the names in $strNamesArray

Parameters

$strNamesArray
names of the columns to remove

Returns

QAbstractHtmlTableColumn[]
the array of columns removed
public
# RemoveAllColumns( )

Remove all columns from the grid.

Remove all columns from the grid.

public
# HideAllColumns( )

Hide all columns without removing them from the grid. They will not display in the html, but they will still be part of the form state.

Hide all columns without removing them from the grid. They will not display in the html, but they will still be part of the form state.

public
# ShowAllColumns( )

Show all columns.

Show all columns.

public QAbstractHtmlTableColumn[]
# GetAllColumns( )

Returns all columns in the table

Returns all columns in the table

Returns

QAbstractHtmlTableColumn[]
public QAbstractHtmlTableColumn
# GetColumn( integer $intColumnIndex, boolean $blnVisible = false )

Get the column at the given index, or null if the index is not valid

Get the column at the given index, or null if the index is not valid

Parameters

$intColumnIndex
$blnVisible
true to only count the visible columns

Returns

QAbstractHtmlTableColumn
public QAbstractHtmlTableColumn
# GetColumnByName( string $strName )

Get the first column that has the given name, or null if a column with the given name does not exist

Get the first column that has the given name, or null if a column with the given name does not exist

Parameters

$strName
column name

Returns

QAbstractHtmlTableColumn
public null|QAbstractHtmlTableColumn
# GetColumnById( $strId )

Parameters

$strId

Returns

null|QAbstractHtmlTableColumn
public QAbstractHtmlTableColumn
# GetColumnIndex( string $strName )

Get the first column that has the given name, or null if a column with the given name does not exist

Get the first column that has the given name, or null if a column with the given name does not exist

Parameters

$strName
column name

Returns

QAbstractHtmlTableColumn
public QAbstractHtmlTableColumn[]
# GetColumnsByName( string $strName )

Get all the columns that have the given name

Get all the columns that have the given name

Parameters

$strName
column name

Returns

QAbstractHtmlTableColumn[]
protected
# GetHeaderRowHtml( )

Returns the HTML for the header row, including the <

protected array
# GetHeaderRowParams( )

Returns a key=>val array of parameters to insert inside of the header row's <

protected string
# GetDataGridRowHtml( object $objObject, integer $intCurrentRowIndex )

Get the html for the row, from the opening <

protected array
# GetRowParams( mixed $objObject, integer $intCurrentRowIndex )

Returns a key/val array of params that will be inserted inside the <

protected null
# GetRowId( object $objObject, integer $intRowIndex )

Return the html row id. Override this to give the row an id.

Return the html row id. Override this to give the row an id.

Parameters

$objObject
object associated with this row
$intRowIndex
index of the row

Returns

null
protected null
# GetRowStyle( object $objObject, integer $intRowIndex )

Return the style string for this row.

Return the style string for this row.

Parameters

$objObject
$intRowIndex

Returns

null
protected null
# GetRowClass( object $objObject, integer $intRowIndex )

Return the class string of this row.

Return the class string of this row.

Parameters

$objObject
$intRowIndex

Returns

null
protected
# GetFooterRowHtml( )

Override to return the footer row html

Override to return the footer row html

protected string
# GetColumnTagsHtml( )

Returns column tags. Only called if blnRenderColumnTags is true.

Returns column tags. Only called if blnRenderColumnTags is true.

Returns

string
Column tag html
protected string
# RenderCaption( )

Returns the caption string which can be used for the table.

Returns the caption string which can be used for the table.

Returns

string
protected string
# GetControlHtml( )

Return the html for the table.

Return the html for the table.

Returns

string
public
# Sleep( )

Preserialize the columns, since some columns might have references to the form.

Preserialize the columns, since some columns might have references to the form.

Overrides

QPaginatedControl::Sleep()
public
# Wakeup( QForm $objForm )

Restore references.

Restore references.

Parameters

$objForm

Overrides

QPaginatedControl::Wakeup()
public boolean|integer|mixed|null
# __get( string $strName )

PHP magic method

PHP magic method

Parameters

$strName

Returns

boolean|integer|mixed|null

Throws

Exception
QCallerException

Overrides

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

PHP magic method

PHP magic method

Parameters

$strName
$mixValue

Returns

mixed|

Throws

Exception
QCallerException
QInvalidCastException

Overrides

QPaginatedControl::__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 QPaginatedControl
DataBind(), Validate()
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(), GetState(), GetStyleAttributes(), GetTemplatePath(), GetWrapperAttributes(), GetWrapperStyleAttributes(), GetWrapperStyler(), IsDescendantOf(), IsModified(), MakeCurrent(), MarkAsModified(), MarkAsRendered(), MarkAsWrapperModified(), ProcessActionParameters(), PutState(), Refresh(), RemoveAllActions(), RemoveChildControl(), RemoveChildControls(), RemoveCustomAttribute(), RemoveCustomStyle(), RemoveWrapperCssClass(), Render(), RenderActionScripts(), RenderAjax(), RenderAttributeScripts(), RenderChildren(), RenderComment(), RenderCssStyles(), RenderExtensionRenderer(), RenderHelper(), RenderHtmlAttributes(), RenderOutput(), RenderWithError(), RenderWithName(), RenderWrappedOutput(), ResetFlags(), ResetOnPageStatus(), SetCustomAttribute(), SetCustomStyle(), SetFocus(), SetForm(), SetParentControl(), SleepHelper(), ValidateControlAndChildren(), ValidationReset(), VarExport(), 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()
Methods used from QDataBinder
CallDataBinder(), GetForm(), HasDataBinder(), SetDataBinder()
Constants inherited from QControlBase
CommentEnd, CommentStart
Properties summary
protected QAbstractHtmlTableColumn[] $objColumnArray
# []
protected string|null $strRowCssClass

CSS class to be applied to for even rows

CSS class to be applied to for even rows

# null
protected string|null $strAlternateRowCssClass

CSS class to be applied to for odd rows

CSS class to be applied to for odd rows

# null
protected string|null $strHeaderRowCssClass

CSS class to be applied to the header row

CSS class to be applied to the header row

# null
protected boolean $blnShowHeader

Show the table header or not?

Show the table header or not?

# true
protected boolean $blnShowFooter

Show the table footer or not?

Show the table footer or not?

# false
protected boolean $blnRenderColumnTags

Column tags have to be rendered or not?

Column tags have to be rendered or not?

# false
protected string|null $strCaption

Table caption, if applicable

Table caption, if applicable

# null
protected boolean $blnHideIfEmpty

When set, the table is hidden/not rendered when the data source is empty

When set, the table is hidden/not rendered when the data source is empty

# false
protected integer $intHeaderRowCount
# 1
protected integer $intCurrentHeaderRowIndex

Used during rendering to report which header row is being drawn in a multi-row header.

Used during rendering to report which header row is being drawn in a multi-row header.

#
protected integer $intCurrentRowIndex

Used during rendering to report which visible row is being drawn.

Used during rendering to report which visible row is being drawn.

#
protected callable $objRowParamsCallback
#
Properties inherited from QPaginatedControl
$blnIsBlockElement, $blnUseAjax, $objDataSource, $objPaginator, $objPaginatorAlternate, $strNoun, $strNounPlural
Properties inherited from QControlBase
$blnActionsMustTerminate, $blnAutoRender, $blnDisplay, $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
Properties used from QDataBinder
$objDataBinder
Magic properties summary
public string $Caption

string to use as the caption of the table

public string $RowCssClass

class to be given to the row tag

public string $AlternateRowCssClass

class to be given to each alternate row tag

public string $HeaderRowCssClass

class to be given the header row

public boolean $ShowHeader

true to show the header row

public boolean $ShowFooter

true to show the footer row

public boolean $RenderColumnTags

true to include col tags in the table output

public boolean $HideIfEmpty

true to completely hide the table if there is no data, vs. drawing the table with no rows.

public read-only integer $CurrentRowIndex

The visual index of the row currently being drawn.

public write-only Callable $RowParamsCallback

Set to a callback function to fetch custom attributes for row tags.

Magic properties inherited from QPaginatedControl
$DataSource, $ItemCount, $ItemsOffset, $ItemsPerPage, $LimitClause, $LimitInfo, $Noun, $NounPlural, $PageCount, $PageNumber, $Paginator, $PaginatorAlternate, $TotalItemCount, $UseAjax
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