posted on 3:22 PM, July 12, 2009
This class represents a list of ExSite::Object objects (in most cases, this is a list of datahashes). It is typically used to represent a set of records from the database. Common list-handling methods are supported, such as count, push, pop, shift, and unshift.
Standalone Objects can be extracted from the ObjectList using a variety of methods.
The ObjectList has an
# edit the 6th element of the list (index 5) $list->select(5); my $obj = $list->newobj(); print $obj->edit();
# ditto $list->select(5); print $list->edit();
Instantiates a new ObjectList. Attributes that can be defined in the
Fetch a list of datahashes from the database to fill the ObjectList.
They are fetched from the table defined by the type attribute,
according to the selection criteria in the
Returns the number of items in the list.
Gets the current index pointer into the list, as an integer. (First item is at index 0.)
Sets the current index pointer into the list.
Clears the index pointer.
Sets the whole list to the values in
Returns the list as an array of datahashes.
Pops the last item in the list, and returns it as an Object.
Shifts the first item off the list, and returns it as an Object.
Cuts the current element (the one that is pointed to by
and resets the
Re-orders the list in order of the given keys. The keys are hash keys of the individual list elements, and the sort order is determined by the values under those keys. If more than one key is given, then the list elements are sorted in that key order (ie. by key1 first, then by key2 if key1 is identical, etc.)
Reverses the order of the list.
Returns a hash of the list elements, indexed by
Returns a formatted HTML report of the items in the list. By default
this is built using
best practices (5)
content management (12)
data handling (7)
graphic design (21)
html formatting (7)
plug-in modules (28)
visual tutorial (29)
web protocols (9)