TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Core\Collection\StaticRecordCollection Class Reference
Inheritance diagram for TYPO3\CMS\Core\Collection\StaticRecordCollection:
TYPO3\CMS\Core\Collection\AbstractRecordCollection TYPO3\CMS\Core\Collection\EditableCollectionInterface TYPO3\CMS\Core\Collection\RecordCollectionInterface TYPO3\CMS\Core\Collection\PersistableCollectionInterface TYPO3\CMS\Core\Collection\SortableCollectionInterface TYPO3\CMS\Core\Collection\CollectionInterface TYPO3\CMS\Core\Collection\NameableCollectionInterface

Public Member Functions

 __construct ($tableName=null)
 
 loadContents ()
 
 add ($data)
 
 addAll (CollectionInterface $other)
 
 remove ($data)
 
 removeAll ()
 
- Public Member Functions inherited from TYPO3\CMS\Core\Collection\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 TYPO3\CMS\Core\Collection\PersistableCollectionInterface
 persist ()
 

Protected Member Functions

 getPersistableDataArray ()
 
 getCollectedRecords ()
 
 getDatabaseConnection ()
 
- Protected Member Functions inherited from TYPO3\CMS\Core\Collection\AbstractRecordCollection
 getPersistableDataArray ()
 
 getItemUidList ($includeTableName=true)
 

Additional Inherited Members

- Static Public Member Functions inherited from TYPO3\CMS\Core\Collection\AbstractRecordCollection
static load ($id, $fillItems=false)
 
static create (array $collectionRecord, $fillItems=false)
 
- Protected Attributes inherited from TYPO3\CMS\Core\Collection\AbstractRecordCollection
 $uid = 0
 
 $title
 
 $description
 
 $itemTableName
 
 $storage
 
- Static Protected Attributes inherited from TYPO3\CMS\Core\Collection\AbstractRecordCollection
static $storageTableName = 'sys_collection'
 
static $storageItemsField = 'items'
 

Detailed Description

Implementation of a RecordCollection for static TCA-Records

Definition at line 20 of file StaticRecordCollection.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Core\Collection\StaticRecordCollection::__construct (   $tableName = null)

Creates this object.

Parameters
string$tableNameName of the table to be working on
Exceptions

Definition at line 50 of file StaticRecordCollection.php.

References TYPO3\CMS\Core\Collection\AbstractRecordCollection\setItemTableName().

Member Function Documentation

◆ add()

TYPO3\CMS\Core\Collection\StaticRecordCollection::add (   $data)

◆ addAll()

TYPO3\CMS\Core\Collection\StaticRecordCollection::addAll ( CollectionInterface  $other)

Adds a set of entries to the collection

Parameters
CollectionInterface$other
Returns
void

Implements TYPO3\CMS\Core\Collection\EditableCollectionInterface.

Definition at line 117 of file StaticRecordCollection.php.

References TYPO3\CMS\Core\Collection\StaticRecordCollection\add().

◆ getCollectedRecords()

TYPO3\CMS\Core\Collection\StaticRecordCollection::getCollectedRecords ( )
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'.

Returns
array

Definition at line 163 of file StaticRecordCollection.php.

References TYPO3\CMS\Core\Collection\StaticRecordCollection\getDatabaseConnection(), TYPO3\CMS\Core\Collection\AbstractRecordCollection\getIdentifier(), and TYPO3\CMS\Core\Collection\AbstractRecordCollection\getItemTableName().

Referenced by TYPO3\CMS\Core\Collection\StaticRecordCollection\loadContents().

◆ getDatabaseConnection()

TYPO3\CMS\Core\Collection\StaticRecordCollection::getDatabaseConnection ( )
protected

Gets the database object.

Returns

Definition at line 187 of file StaticRecordCollection.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Core\Collection\StaticRecordCollection\getCollectedRecords().

◆ getPersistableDataArray()

TYPO3\CMS\Core\Collection\StaticRecordCollection::getPersistableDataArray ( )
protected

Returns an array of the persistable properties and contents which are processable by TCEmain.

for internal usage in persist only.

Returns
array

Definition at line 89 of file StaticRecordCollection.php.

References TYPO3\CMS\Core\Collection\AbstractRecordCollection\getDescription(), TYPO3\CMS\Core\Collection\AbstractRecordCollection\getItemTableName(), TYPO3\CMS\Core\Collection\AbstractRecordCollection\getItemUidList(), and TYPO3\CMS\Core\Collection\AbstractRecordCollection\getTitle().

◆ loadContents()

TYPO3\CMS\Core\Collection\StaticRecordCollection::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.

Returns
void

Implements TYPO3\CMS\Core\Collection\PersistableCollectionInterface.

Definition at line 72 of file StaticRecordCollection.php.

References TYPO3\CMS\Core\Collection\StaticRecordCollection\add(), TYPO3\CMS\Core\Collection\StaticRecordCollection\getCollectedRecords(), and TYPO3\CMS\Core\Collection\StaticRecordCollection\removeAll().

◆ remove()

TYPO3\CMS\Core\Collection\StaticRecordCollection::remove (   $data)

Removes the given entry from collection

Note: not the given "index"

Parameters
mixed$data
Returns
void

Implements TYPO3\CMS\Core\Collection\EditableCollectionInterface.

Definition at line 132 of file StaticRecordCollection.php.

◆ removeAll()

TYPO3\CMS\Core\Collection\StaticRecordCollection::removeAll ( )

Removes all entries from the collection

collection will be empty afterwards

Returns
void

Implements TYPO3\CMS\Core\Collection\EditableCollectionInterface.

Definition at line 151 of file StaticRecordCollection.php.

Referenced by TYPO3\CMS\Core\Collection\StaticRecordCollection\loadContents().