‪TYPO3CMS  9.5
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 ()
 
mixed current ()
 
 next ()
 
int key ()
 
bool valid ()
 
 rewind ()
 
string serialize ()
 
mixed unserialize ($serialized)
 
int count ()
 
string getTitle ()
 
int getUid ()
 
string getDescription ()
 
 setTitle ($title)
 
 setDescription ($desc)
 
string getItemTableName ()
 
 setItemTableName ($tableName)
 
 usort ($callbackFunction)
 
 moveItemAt ($currentPosition, $newPosition=0)
 
int getIdentifier ()
 
 setIdentifier ($id)
 
 persist ()
 
array toArray ()
 
 fromArray (array $array)
 

Static Public Member Functions

static TYPO3 CMS Core Collection StaticRecordCollection create (array $collectionRecord, $fillItems=false)
 
- ‪Static Public Member Functions inherited from ‪TYPO3\CMS\Core\Collection\AbstractRecordCollection
static TYPO3 CMS Core Collection CollectionInterface load ($id, $fillItems=false)
 

Protected Member Functions

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

Additional Inherited Members

- ‪Protected Attributes inherited from ‪TYPO3\CMS\Core\Collection\AbstractRecordCollection
int $uid = 0
 
string $title
 
string $description
 
string $itemTableName
 
SplDoublyLinkedList $storage
 
- ‪Static Protected Attributes inherited from ‪TYPO3\CMS\Core\Collection\AbstractRecordCollection
static string $storageTableName = 'sys_collection'
 
static string $storageItemsField = 'items'
 

Detailed Description

Implementation of a RecordCollection for static TCA-Records

Definition at line 23 of file StaticRecordCollection.php.

Constructor & Destructor Documentation

◆ __construct()

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

Creates this object.

Parameters
string$tableName‪Name of the table to be working on
Exceptions

Definition at line 53 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

Implements TYPO3\CMS\Core\Collection\EditableCollectionInterface.

Definition at line 116 of file StaticRecordCollection.php.

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

◆ create()

static TYPO3 CMS Core Collection StaticRecordCollection TYPO3\CMS\Core\Collection\StaticRecordCollection::create ( array  $collectionRecord,
  $fillItems = false 
)
static

Creates a new collection objects and reconstitutes the given database record to the new object.

Parameters
array$collectionRecordDatabase record
bool$fillItems‪Populates the entries directly on load, might be bad for memory on large collections
Returns
‪\TYPO3\CMS\Core\Collection\StaticRecordCollection

Reimplemented from TYPO3\CMS\Core\Collection\AbstractRecordCollection.

Definition at line 33 of file StaticRecordCollection.php.

Referenced by TYPO3\CMS\Core\Collection\RecordCollectionRepository\createDomainObject().

◆ getCollectedRecords()

array 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 159 of file StaticRecordCollection.php.

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

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

◆ getPersistableDataArray()

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

◆ 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.

Implements TYPO3\CMS\Core\Collection\PersistableCollectionInterface.

Definition at line 73 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

Implements TYPO3\CMS\Core\Collection\EditableCollectionInterface.

Definition at line 130 of file StaticRecordCollection.php.

◆ removeAll()

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

Removes all entries from the collection

collection will be empty afterwards

Implements TYPO3\CMS\Core\Collection\EditableCollectionInterface.

Definition at line 147 of file StaticRecordCollection.php.

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