Comments: on this page. Click to read or post your own.
Implements interfaces:
This class represents a set of ViewableData subclasses (mostly DataObject or ArrayData).
It is used by the ORM-layer of Silverstripe to return query-results from SQLQuery.
Located in /sapphire/core/model/DataObjectSet.php (line 14)
Object | --ViewableData | --DataObjectSet
| Class | Description |
|---|---|
| FieldSet | DataObjectSet designed for form fields. |
| ComponentSet | This is a special kind of DataObjectSet used to represent the items linked to in a 1-many or many-many join. It provides add and remove methods that will update the database. |
The current DataObject in this set.
True if the current DataObject is the first in this set.
The DataObjects in this set.
True if the current DataObject is the last in this set.
The number of objects per page.
The number object the current page starts at.
The pagination GET variable that controls the start of this set.
Total number of DataObjects in this set.
Inherited from ViewableData
ViewableData::$casting
ViewableData::$castingHelperPair_cache
ViewableData::$customisedObj
ViewableData::$failover
ViewableData::$iteratorPos
ViewableData::$iteratorTotalItems
ViewableData::$namedAs
ViewableData::$parent
ViewableData::$_natural_cache
ViewableData::$_object_cache
ViewableData::$_xml_cache
Inherited from Object
Object::$builtInMethods
Object::$class
Object::$classConstructed
Object::$extensions
Object::$extension_instances
Object::$extraMethods
Object::$extraStatics
Object::$statics
Object::$static_cached
Create a new DataObjectSet. If you pass one or more arguments, it will try to convert them into ArrayData objects.
Add a field to this set without writing it to the database
Returns a nested unordered list out of a "chain" of DataObject-relations, using the automagic ComponentSet-relation-methods to find subsequent DataObjectSets.
The formatting of the list can be different for each level, and is evaluated as an SS-template with access to the current DataObjects attributes and methods.
Example: Groups (Level 0, the "calling" DataObjectSet, needs to be queried externally) and their Members (Level 1, determined by the Group->Members()-relation).
Return a column of the given field
Consolidate the DataObjectSet into an array of arrays
The array will contain the field values of the specified fields
Consolidate the DataObjectSet into XHTML The string will contain the field values of the specified fields.
Returns true if the DataObjectSet contains all of the IDs givem
Returns the actual number of items in this dataset.
Returns the number of the current page.
Returns information about this set in HTML format for debugging.
Destory all of the DataObjects in this set.
Returns false if the set is empty.
Temporary filter method for filtering a list based on multiple fields of the DataObject.
Question: should any args be passed to the filter function?
Find an item in this list where the field $key is equal to $value
Eg: $doSet->find('ID', 4);
Return the first item in the set.
Returns this set as a XHTML unordered list.
Gets called recursively on the child-objects of the chain.
Returns an Iterator for this DataObjectSet.
This function allows you to use DataObjectSets in foreach loops
Gets a specific slice of an existing set.
Returns an array of DataObjectSets. The array is keyed by index.
Groups the items by a given field.
Returns a DataObjectSet suitable for use in a nested template.
Groups the set by $groupField and returns the parent of each group whose class is $groupClassName. If $collapse is true, the group will be collapsed up until an ancestor with the given class is found.
Add an item to the beginning of the DataObjectSet
Return the last item in the set.
Returns the dataset as an array of ID => Title.
Returns the dataset as an array of ID => "FirstName Surname"
Merge another set onto the end of this set.
Returns true if there is more than one page.
Returns the URL of the next page.
Returns true if the current page is not the first page.
Returns true if the current page is not the last page.
Returns true if the DataObjectSet contains all of and *only* the IDs given.
Note that it won't like duplicates very much.
Return a datafeed of page-links, good for use in search results, etc.
$maxPages will put an upper limit on the number of pages to return. It will show the pages surrounding the current page, so you can still get to the deeper pages.
Use the limit from the given query to add prev/next buttons to this DataObjectSet.
Returns the URL of the previous page.
Add an item to the DataObject Set.
Remove a DataObject from this set.
Remove duplicates from this set based on the dataobjects ID.
Assumes all items contained in the set all have IDs.
Set number of objects on each page.
Set the page limits.
Allows us to use multiple pagination GET variables on the same page (eg. if you have search results and page comments on a single page)
Example: @see PageCommentInterface::Comments()
Insert a DataObject at the beginning of this set.
Returns a new DataObjectSet of the sorted array
Convert this DataObjectSet to an array of DataObjects.
Returns an array of ID => $titleField
Convert this DataObjectSet to an array of maps.
Return the total number of items in this dataset.
Returns the total number of pages.
Returns this set as a XHTML unordered list.
Inherited From ViewableData
ViewableData::ATT_val()
ViewableData::BaseHref()
ViewableData::buildCastingHelperCache()
ViewableData::cachedCall()
ViewableData::castingHelper()
ViewableData::castingHelperPair()
ViewableData::castingObjectCreator()
ViewableData::castingObjectCreatorPair()
ViewableData::CSSClasses()
ViewableData::CurrentMember()
ViewableData::CurrentPage()
ViewableData::customise()
ViewableData::Debug()
ViewableData::defineMethods()
ViewableData::escapeTypeForField()
ViewableData::Even()
ViewableData::EvenOdd()
ViewableData::First()
ViewableData::FirstLast()
ViewableData::getField()
ViewableData::getIterator()
ViewableData::getXMLValues()
ViewableData::hasField()
ViewableData::HasPerm()
ViewableData::hasValue()
ViewableData::i18nLocale()
ViewableData::IsAjax()
ViewableData::iteratorProperties()
ViewableData::JS_val()
ViewableData::Last()
ViewableData::Me()
ViewableData::Middle()
ViewableData::MiddleString()
ViewableData::obj()
ViewableData::Odd()
ViewableData::Pos()
ViewableData::RAW_val()
ViewableData::renderWith()
ViewableData::SecurityID()
ViewableData::setCustomisedObj()
ViewableData::setField()
ViewableData::SQL_val()
ViewableData::ThemeDir()
ViewableData::Top()
ViewableData::TotalItems()
ViewableData::val()
ViewableData::XML_val()
ViewableData::__get()
ViewableData::__isset()
ViewableData::__set()
Inherited From Object
Object::__construct()
Object::addMethodsFrom()
Object::addStaticVars()
Object::addWrapperMethod()
Object::add_extension()
Object::allMethodNames()
Object::buildMethodList()
Object::cacheToFile()
Object::cacheToFileWithArgs()
Object::create()
Object::createMethod()
Object::defineMethods()
Object::exists()
Object::extend()
Object::extInstance()
Object::getCustomClass()
Object::hasExtension()
Object::hasMethod()
Object::invokeWithExtensions()
Object::is_a()
Object::loadCache()
Object::parentClass()
Object::sanitiseCachename()
Object::saveCache()
Object::set_stat()
Object::set_uninherited()
Object::stat()
Object::strong_create()
Object::uninherited()
Object::useCustomClass()
Object::__call()
Object::__toString()
Documentation generated on Sun, 19 Oct 2008 06:39:58 +1300 by phpDocumentor 1.3.2