Class QDataRepeater
The QDataRepeater is a generic html base object for creating an object that contains a list of items tied to the database. To specify how to draw the items, you can either create a template file, override the GetItemHtml method, override the GetItemInnerHtml and GetItemAttributes methods, or specify corresponding callbacks for those methods.
The callbacks below can be specified as either a string, or an array. If a string, it should be the name of a public method in the parent form. If an array, it should be a PHP Callable array. If your callback is a method in a form, do NOT pass the form object in to the array, but rather just pass the name of the method as a string. (This is due to a problem PHP has with serializing recursive objects.) If its a method in a control, pass an array with the control and method name, i.e. [$objControl, 'RenderMethod']
- QBaseClass
- QHtmlAttributeManagerBase
- QHtmlAttributeManager
- QControlBase
- QControl
- QPaginatedControl uses QDataBinder
- QDataRepeater
public
|
|
protected
string
|
#
GetItemHtml( $objItem )
Returns the html corresponding to a given item. You have many ways of rendering an item: - Specify a template that will get evaluated for each item. See EvaluateTemplate for more info. - Specify a HtmlCallback callable to be called for each item to get the html for the item. - Override this routine. - Specify the item's tag name, and then use the helper functions or callbacks to return just the attributes and/or inner html of the object. |
protected
array
|
#
GetItemAttributes( $objItem )
Return the attributes that go in the item tag, as an array of key=>value pairs. Values will be escaped for you. If you define AttributesCallback, it will be used to determine the attributes. |
protected
mixed
|
#
GetItemInnerHtml( $objItem )
Returns the HTML between the item tags. Uses __toString on the object by default. Will use the InnerHtmlCallback if provided. |
protected
string
|
|
public
integer|mixed|string
|
|
public
mixed|
|
DataBind(),
Validate(),
__construct()
|
OverrideAttributes(),
__call()
|
CallDataBinder(),
GetForm(),
HasDataBinder(),
SetDataBinder(),
Sleep(),
Wakeup()
|
CommentEnd,
CommentStart
|
protected
string
|
$strTemplate
|
#
null
|
protected
integer
|
$intCurrentItemIndex
|
#
null
|
protected
string
|
$strTagName
|
#
'div'
|
protected
string
|
$strItemTagName
|
#
'div'
|
protected
Callable
|
$itemHtmlCallback
| string |
|
protected
Callable
|
$itemAttributesCallback
| string |
|
protected
Callable
|
$itemInnerHtmlCallback
| string |
$blnIsBlockElement,
$blnUseAjax,
$objDataSource,
$objPaginator,
$objPaginatorAlternate,
$strNoun,
$strNounPlural
|
$attributes,
$styles
|
$objDataBinder
|
public
string
|
$TagName
The tag name to be used as the main object |
public
string
|
$ItemTagName
The tag name to used for each item (if Template is not defined) |
public
string
|
$Template
A php template file that will be evaluated for each item. The template will have $_ITEM as the item in the DataSource array, $_CONTROL as this control, and $_FORM as the form object. If you provide a template, the callbacks will not be used. |
public read-only
integer
|
$CurrentItemIndex
The zero-based index of the item being drawn. |
public write-only
string
|
$ItemHtmlCallback
A Callable which will be called to get the html for each item. Parameters passed are the item from the DataSource array, and the index of the item being drawn. The callback should return the entire html for the item. If you provide this callback, the ItemAttributesCallback and ItemInnerHtmlCallback will not be used. |
public write-only
string
|
$ItemAttributesCallback
A Callable which will be called to get the attributes for each item. Use this with the ItemInnerHtmlCallback and the ItemTagName. The callback will be passed the item and the index of the item. It should return key/value pairs which will be used as the attributes for the item's tag. Use only if you are not using a Template or the ItemHtmlCallback. |
public write-only
string
|
$ItemInnerHtmlCallback
A Callable which will be called to get the inner html for each item. Use this with the ItemAttributesCallback and the ItemTagName. The callback will be passed the item and the index of the item. It should return the complete text to appear inside the open and close tags for the item. * |
$DataSource,
$ItemCount,
$ItemsOffset,
$ItemsPerPage,
$LimitClause,
$LimitInfo,
$Noun,
$NounPlural,
$PageCount,
$PageNumber,
$Paginator,
$PaginatorAlternate,
$TotalItemCount,
$UseAjax
|
$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
|