TYPO3
7.6
|
Public Member Functions | |
__construct () | |
current () | |
next () | |
key () | |
valid () | |
rewind () | |
serialize () | |
unserialize ($serialized) | |
count () | |
getTitle () | |
getUid () | |
getDescription () | |
setTitle ($title) | |
setDescription ($desc) | |
getItemTableName () | |
setItemTableName ($tableName) | |
usort ($callbackFunction) | |
moveItemAt ($currentPosition, $newPosition=0) | |
getIdentifier () | |
setIdentifier ($id) | |
toArray () | |
fromArray (array $array) | |
Public Member Functions inherited from PersistableCollectionInterface | |
persist () | |
loadContents () | |
Static Public Member Functions | |
static | load ($id, $fillItems=false) |
static | create (array $collectionRecord, $fillItems=false) |
Protected Member Functions | |
getPersistableDataArray () | |
getItemUidList ($includeTableName=true) | |
Protected Attributes | |
$uid = 0 | |
$title | |
$description | |
$itemTableName | |
$storage | |
Static Protected Attributes | |
static | $storageTableName = 'sys_collection' |
static | $storageItemsField = 'items' |
Abstract implementation of a RecordCollection
RecordCollection is a collections of TCA-Records. The collection is meant to be stored in TCA-table sys_collections and is manageable via TCEforms.
A RecordCollection might be used to group a set of records (e.g. news, images, contentElements) for output in frontend
The AbstractRecordCollection uses SplDoublyLinkedList for internal storage
Definition at line 29 of file AbstractRecordCollection.php.
__construct | ( | ) |
Creates this object.
Definition at line 83 of file AbstractRecordCollection.php.
count | ( | ) |
(PHP 5 >= 5.1.0) Count elements of an object
int The custom count as an integer.
Definition at line 185 of file AbstractRecordCollection.php.
|
static |
Creates a new collection objects and reconstitutes the given database record to the new object.
array | $collectionRecord | Database record |
bool | $fillItems | Populates the entries directly on load, might be bad for memory on large collections |
Definition at line 345 of file AbstractRecordCollection.php.
Referenced by RecordCollectionRepository\createDomainObject().
current | ( | ) |
(PHP 5 >= 5.1.0) Return the current element
Definition at line 95 of file AbstractRecordCollection.php.
fromArray | ( | array | $array | ) |
Loads the properties of this collection from an array
array | $array |
Definition at line 433 of file AbstractRecordCollection.php.
getDescription | ( | ) |
Getter for the description
Implements NameableCollectionInterface.
Definition at line 215 of file AbstractRecordCollection.php.
References AbstractRecordCollection\$description.
Referenced by StaticRecordCollection\getPersistableDataArray(), FolderBasedFileCollection\getPersistableDataArray(), AbstractFileCollection\getPersistableDataArray(), CategoryCollection\getPersistableDataArray(), and AbstractRecordCollection\toArray().
getIdentifier | ( | ) |
Returns the uid of the collection
Implements PersistableCollectionInterface.
Definition at line 300 of file AbstractRecordCollection.php.
References AbstractRecordCollection\$uid.
Referenced by CategoryCollection\getCollectedRecords(), StaticRecordCollection\getCollectedRecords(), AbstractRecordCollection\serialize(), and AbstractRecordCollection\toArray().
getItemTableName | ( | ) |
Setter for the name of the data-source table
Implements RecordCollectionInterface.
Definition at line 247 of file AbstractRecordCollection.php.
References AbstractRecordCollection\$itemTableName.
Referenced by CategoryCollection\getCollectedRecords(), StaticRecordCollection\getCollectedRecords(), AbstractRecordCollection\getItemUidList(), StaticRecordCollection\getPersistableDataArray(), and AbstractRecordCollection\toArray().
|
protected |
Generates comma-separated list of entry uids for usage in TCEmain
also allow to add table name, if it might be needed by TCEmain for storing the relation
bool | $includeTableName |
Definition at line 398 of file AbstractRecordCollection.php.
References $list, and AbstractRecordCollection\getItemTableName().
Referenced by StaticRecordCollection\getPersistableDataArray(), and CategoryCollection\getPersistableDataArray().
|
abstractprotected |
Returns an array of the persistable properties and contents which are processable by TCEmain.
For internal usage in persist only.
getTitle | ( | ) |
Getter for the title
Implements NameableCollectionInterface.
Definition at line 195 of file AbstractRecordCollection.php.
References AbstractRecordCollection\$title.
Referenced by StaticRecordCollection\getPersistableDataArray(), FolderBasedFileCollection\getPersistableDataArray(), AbstractFileCollection\getPersistableDataArray(), CategoryCollection\getPersistableDataArray(), and AbstractRecordCollection\toArray().
getUid | ( | ) |
Getter for the UID
Definition at line 205 of file AbstractRecordCollection.php.
References AbstractRecordCollection\$uid.
key | ( | ) |
(PHP 5 >= 5.1.0) Return the key of the current element
Definition at line 119 of file AbstractRecordCollection.php.
|
static |
Loads the collections with the given id from persistence
For memory reasons, per default only f.e. title, database-table, identifier (what ever static data is defined) is loaded. Entries can be load on first access.
int | $id | Id of database record to be loaded |
bool | $fillItems | Populates the entries directly on load, might be bad for memory on large collections |
Implements PersistableCollectionInterface.
Definition at line 327 of file AbstractRecordCollection.php.
References $GLOBALS, and BackendUtility\deleteClause().
moveItemAt | ( | $currentPosition, | |
$newPosition = 0 |
|||
) |
Moves the item within the collection
the item at $currentPosition will be moved to $newPosition. Omiting $newPosition will move to top.
int | $currentPosition | |
int | $newPosition |
Implements SortableCollectionInterface.
Definition at line 289 of file AbstractRecordCollection.php.
next | ( | ) |
(PHP 5 >= 5.1.0) Move forward to next element
void Any returned value is ignored.
Definition at line 107 of file AbstractRecordCollection.php.
rewind | ( | ) |
(PHP 5 >= 5.1.0) Rewind the Iterator to the first element
void Any returned value is ignored.
Definition at line 144 of file AbstractRecordCollection.php.
serialize | ( | ) |
(PHP 5 >= 5.1.0) String representation of object
string the string representation of the object or
Definition at line 156 of file AbstractRecordCollection.php.
References AbstractRecordCollection\getIdentifier().
setDescription | ( | $desc | ) |
Setter for the description
string | $desc |
Implements NameableCollectionInterface.
Definition at line 237 of file AbstractRecordCollection.php.
setIdentifier | ( | $id | ) |
Sets the identifier of the collection
int | $id |
Implements PersistableCollectionInterface.
Definition at line 311 of file AbstractRecordCollection.php.
setItemTableName | ( | $tableName | ) |
Setter for the name of the data-source table
string | $tableName |
Implements RecordCollectionInterface.
Definition at line 258 of file AbstractRecordCollection.php.
Referenced by CategoryCollection\__construct(), and StaticRecordCollection\__construct().
setTitle | ( | $title | ) |
Setter for the title
string | $title |
Implements NameableCollectionInterface.
Definition at line 226 of file AbstractRecordCollection.php.
References AbstractRecordCollection\$title.
toArray | ( | ) |
Builds an array representation of this collection
Definition at line 412 of file AbstractRecordCollection.php.
References AbstractRecordCollection\getDescription(), AbstractRecordCollection\getIdentifier(), AbstractRecordCollection\getItemTableName(), and AbstractRecordCollection\getTitle().
unserialize | ( | $serialized | ) |
(PHP 5 >= 5.1.0) Constructs the object
string $serialized The string representation of the object mixed the original value unserialized.
Definition at line 172 of file AbstractRecordCollection.php.
usort | ( | $callbackFunction | ) |
Sorts collection via given callBackFunction
The comparison function given as must return an integer less than, equal to, or greater than zero if the first argument is considered to be respectively less than, equal to, or greater than the second.
$callbackFunction |
Implements SortableCollectionInterface.
Definition at line 273 of file AbstractRecordCollection.php.
valid | ( | ) |
(PHP 5 >= 5.1.0) Checks if current position is valid
bool The return value will be casted to boolean and then evaluated.
Definition at line 132 of file AbstractRecordCollection.php.
|
protected |
Definition at line 64 of file AbstractRecordCollection.php.
Referenced by AbstractRecordCollection\getDescription(), and AbstractFileCollection\setDescription().
|
protected |
Definition at line 71 of file AbstractRecordCollection.php.
Referenced by AbstractRecordCollection\getItemTableName().
|
protected |
Definition at line 78 of file AbstractRecordCollection.php.
|
staticprotected |
Definition at line 43 of file AbstractRecordCollection.php.
|
staticprotected |
Definition at line 36 of file AbstractRecordCollection.php.
|
protected |
Definition at line 57 of file AbstractRecordCollection.php.
Referenced by AbstractRecordCollection\getTitle(), AbstractFileCollection\setTitle(), and AbstractRecordCollection\setTitle().
|
protected |
Definition at line 50 of file AbstractRecordCollection.php.
Referenced by AbstractRecordCollection\getIdentifier(), and AbstractRecordCollection\getUid().