TYPO3
7.6
|
Public Member Functions | |
__construct ($tableName=null, $fieldName=null) | |
loadContents () | |
add ($data) | |
addAll (CollectionInterface $other) | |
remove ($data) | |
removeAll () | |
setRelationFieldName ($field) | |
getRelationFieldName () | |
Public Member Functions inherited from AbstractRecordCollection | |
__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 () | |
Static Public Member Functions | |
static | load ($id, $fillItems=false, $tableName= '', $fieldName= '') |
static | getStorageTableName () |
static | getStorageItemsField () |
Static Public Member Functions inherited from AbstractRecordCollection | |
static | load ($id, $fillItems=false) |
static | create (array $collectionRecord, $fillItems=false) |
Protected Member Functions | |
getCollectedRecords () | |
getPersistableDataArray () | |
Protected Member Functions inherited from AbstractRecordCollection | |
getPersistableDataArray () | |
getItemUidList ($includeTableName=true) | |
Static Protected Member Functions | |
static | getDatabaseConnection () |
Protected Attributes | |
$relationFieldName = 'categories' | |
Protected Attributes inherited from AbstractRecordCollection | |
$uid = 0 | |
$title | |
$description | |
$itemTableName | |
$storage | |
Static Protected Attributes | |
static | $storageTableName = 'sys_category' |
Static Protected Attributes inherited from AbstractRecordCollection | |
static | $storageTableName = 'sys_collection' |
static | $storageItemsField = 'items' |
Category Collection to handle records attached to a category
Definition at line 26 of file core/Classes/Category/Collection/CategoryCollection.php.
__construct | ( | $tableName = null , |
|
$fieldName = null |
|||
) |
Creates this object.
string | $tableName | Name of the table to be working on |
string | $fieldName | Name of the field where the categories relations are defined |
\RuntimeException |
Definition at line 49 of file core/Classes/Category/Collection/CategoryCollection.php.
References elseif, AbstractRecordCollection\setItemTableName(), and CategoryCollection\setRelationFieldName().
add | ( | $data | ) |
Adds on entry to the collection
mixed | $data |
Implements EditableCollectionInterface.
Definition at line 190 of file core/Classes/Category/Collection/CategoryCollection.php.
Referenced by CategoryCollection\addAll(), and CategoryCollection\loadContents().
addAll | ( | CollectionInterface | $other | ) |
Adds a set of entries to the collection
CollectionInterface | $other |
Implements EditableCollectionInterface.
Definition at line 201 of file core/Classes/Category/Collection/CategoryCollection.php.
References CategoryCollection\add().
|
protected |
Gets the collected records in this collection, by looking up the MM relations of this record to the table name defined in the local field 'table_name'.
Definition at line 116 of file core/Classes/Category/Collection/CategoryCollection.php.
References AbstractRecordCollection\getIdentifier(), AbstractRecordCollection\getItemTableName(), and CategoryCollection\getRelationFieldName().
Referenced by CategoryCollection\loadContents().
|
staticprotected |
Gets the database object.
Definition at line 298 of file core/Classes/Category/Collection/CategoryCollection.php.
References $GLOBALS.
|
protected |
Returns an array of the persistable properties and contents which are processable by TCEmain. for internal usage in persist only.
Definition at line 175 of file core/Classes/Category/Collection/CategoryCollection.php.
References AbstractRecordCollection\getDescription(), AbstractRecordCollection\getItemUidList(), and AbstractRecordCollection\getTitle().
getRelationFieldName | ( | ) |
Gets the name of the categories relation field
Definition at line 268 of file core/Classes/Category/Collection/CategoryCollection.php.
References CategoryCollection\$relationFieldName.
Referenced by CategoryCollection\getCollectedRecords().
|
static |
Getter for the storage items field
Definition at line 288 of file core/Classes/Category/Collection/CategoryCollection.php.
|
static |
Getter for the storage table name
Definition at line 278 of file core/Classes/Category/Collection/CategoryCollection.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 |
string | $tableName | Name of table from which entries should be loaded |
string | $fieldName | Name of the categories relation field |
Definition at line 97 of file core/Classes/Category/Collection/CategoryCollection.php.
References BackendUtility\deleteClause().
loadContents | ( | ) |
Populates the content-entries of the storage Queries the underlying storage for entries of the collection and adds them to the collection data. If the content entries of the storage had not been loaded on creation ($fillItems = false) this function is to be used for loading the contents afterwards.
Implements PersistableCollectionInterface.
Definition at line 159 of file core/Classes/Category/Collection/CategoryCollection.php.
References CategoryCollection\add(), CategoryCollection\getCollectedRecords(), and CategoryCollection\removeAll().
remove | ( | $data | ) |
Removes the given entry from collection Note: not the given "index"
mixed | $data |
Implements EditableCollectionInterface.
Definition at line 215 of file core/Classes/Category/Collection/CategoryCollection.php.
removeAll | ( | ) |
Removes all entries from the collection collection will be empty afterwards
Implements EditableCollectionInterface.
Definition at line 233 of file core/Classes/Category/Collection/CategoryCollection.php.
Referenced by CategoryCollection\loadContents().
setRelationFieldName | ( | $field | ) |
Sets the name of the categories relation field
string | $field |
Definition at line 258 of file core/Classes/Category/Collection/CategoryCollection.php.
Referenced by CategoryCollection\__construct().
|
protected |
Definition at line 40 of file core/Classes/Category/Collection/CategoryCollection.php.
Referenced by CategoryCollection\getRelationFieldName().
|
staticprotected |
Definition at line 33 of file core/Classes/Category/Collection/CategoryCollection.php.