TYPO3 CMS  TYPO3_6-2
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 t3lib_collection_StaticRecordCollection

Public Member Functions

 __construct ($tableName=NULL)
 
 loadContents ()
 
 add ($data)
 
 addAll (\TYPO3\CMS\Core\Collection\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 ()
 
- 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

This file is part of the TYPO3 CMS project.

It is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, either version 2 of the License, or any later version.

For the full copyright and license information, please read the LICENSE.txt file that was distributed with this source code.

The TYPO3 project - inspiring people to share! Implementation of a RecordCollection for static TCA-Records

Author
Steffen Ritter typo3.nosp@m.@ste.nosp@m.ffen-.nosp@m.ritt.nosp@m.er.ne.nosp@m.t

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

Definition at line 46 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 ( \TYPO3\CMS\Core\Collection\CollectionInterface  $other)

Adds a set of entries to the collection

Parameters
\TYPO3\CMS\Core\Collection\CollectionInterface$other
Returns
void

Implements TYPO3\CMS\Core\Collection\EditableCollectionInterface.

Definition at line 109 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 152 of file StaticRecordCollection.php.

References $GLOBALS, TYPO3\CMS\Core\Collection\AbstractRecordCollection\getIdentifier(), and TYPO3\CMS\Core\Collection\AbstractRecordCollection\getItemTableName().

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

◆ 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 83 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 67 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 123 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 141 of file StaticRecordCollection.php.

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