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

Trait QListItemManager

This is a trait that presents an interface for managing an item list. It is used by the QListControl, QHListControl, and the QHListItem classes, the latter because a QHListItem can itself contain a list of other items.

Note that some abstract methods are declared here that must be implemented by the using class: GetId() - returns the id MarkAsModified() - marks the object as modified. Optional.

Direct Known Users

QHListControl, QHListItem, QListControl

Indirect Known Users

ProjectPickerListBox, QCheckBoxList, QListBox, QListBoxBase, QRadioButtonList, QSelectMenu, QSelectMenuBase, QSelectMenuGen
Package: Controls
Located at includes/base_controls/QListItemManager.trait.php
Methods summary
public
# AddListItem( QListItemBase $objListItem )

Add a base list item to the list.

Add a base list item to the list.

Parameters

$objListItem
public
# AddItemAt( integer $intIndex, QListItemBase $objListItem )

Allows you to add a ListItem at a certain index Unlike AddItem, this will insert the ListItem at whatever index is passed to the function. Additionally, only a ListItem object can be passed (as opposed to an object or strings)

Allows you to add a ListItem at a certain index Unlike AddItem, this will insert the ListItem at whatever index is passed to the function. Additionally, only a ListItem object can be passed (as opposed to an object or strings)

Parameters

$intIndex
index at which the item should be inserted
$objListItem
the ListItem which shall be inserted

Throws

QIndexOutOfRangeException
Exception|QInvalidCastException
public
# Reindex( )

Reindex the ids of the items based on the current item. We manage all the ids in the list internally to be able to get to an item in the list quickly, and to make sure the ids are unique.

Reindex the ids of the items based on the current item. We manage all the ids in the list internally to be able to get to an item in the list quickly, and to make sure the ids are unique.

abstract public
# MarkAsModified( )

Stub function. The including function needs to implement this.

Stub function. The including function needs to implement this.

abstract public string
# GetId( )

Returns the id of the item, however the item stores it.

Returns the id of the item, however the item stores it.

Returns

string
public
# AddListItems( array $objListItemArray )

Adds an array of items,

Adds an array of items,

Parameters

$objListItemArray
Array of QListItems or key=>val pairs.

Throws

Exception|QInvalidCastException
public QListItem
# GetItem( integer $intIndex )

Retrieve the ListItem at the specified index location

Retrieve the ListItem at the specified index location

Parameters

$intIndex

Returns

QListItem

Throws

QIndexOutOfRangeException
Exception|QInvalidCastException
public QListItem[]
# GetAllItems( )

This will return an array of ALL the QListItems associated with this QListControl. Please note that while each individual item can be altered, altering the array, itself, will not affect any change on the QListControl. So existing QListItems may be modified, but to add / remove items from the QListControl, you should use AddItem() and RemoveItem().

This will return an array of ALL the QListItems associated with this QListControl. Please note that while each individual item can be altered, altering the array, itself, will not affect any change on the QListControl. So existing QListItems may be modified, but to add / remove items from the QListControl, you should use AddItem() and RemoveItem().

Returns

QListItem[]
public
# RemoveAllItems( )

Removes all the items in objListItemArray

Removes all the items in objListItemArray

public
# RemoveItem( integer $intIndex )

Removes a ListItem at the specified index location

Removes a ListItem at the specified index location

Parameters

$intIndex

Throws

QIndexOutOfRangeException
Exception|QInvalidCastException
public
# ReplaceItem( integer $intIndex, QListItem $objListItem )

Replaces a QListItem at $intIndex. This combines the RemoveItem() and AddItemAt() operations.

Replaces a QListItem at $intIndex. This combines the RemoveItem() and AddItemAt() operations.

Parameters

$intIndex
$objListItem

Throws

Exception|QInvalidCastException
public integer
# GetItemCount( )

Return the count of the items.

Return the count of the items.

Returns

integer
public null|QListItem
# FindItem( string $strId )

Finds the item by id recursively. Makes use of the fact that we maintain the ids in order to efficiently find the item.

Finds the item by id recursively. Makes use of the fact that we maintain the ids in order to efficiently find the item.

Parameters

$strId
If this is a sub-item, it will be an id fragment

Returns

null|QListItem
public null|QListItemBase
# FindItemByValue( $strValue )

Returns the first tiem found with the given value.

Returns the first tiem found with the given value.

Parameters

$strValue

Returns

null|QListItemBase
Properties summary
protected QListItemBase[] $objListItemArray

an array of subitems if this is a recursive item.

an array of subitems if this is a recursive item.

#
API documentation generated by ApiGen