‪TYPO3CMS  ‪main
TYPO3\CMS\Core\Resource\Collection\AbstractFileCollection Class Reference
Inheritance diagram for TYPO3\CMS\Core\Resource\Collection\AbstractFileCollection:
TYPO3\CMS\Core\Collection\AbstractRecordCollection TYPO3\CMS\Core\Collection\AbstractRecordCollection TYPO3\CMS\Core\Collection\SortableCollectionInterface TYPO3\CMS\Core\Collection\PersistableCollectionInterface TYPO3\CMS\Core\Collection\RecordCollectionInterface TYPO3\CMS\Core\Collection\RecordCollectionInterface TYPO3\CMS\Core\Collection\SortableCollectionInterface TYPO3\CMS\Core\Collection\PersistableCollectionInterface TYPO3\CMS\Core\Collection\RecordCollectionInterface TYPO3\CMS\Core\Collection\RecordCollectionInterface TYPO3\CMS\Core\Resource\Collection\CategoryBasedFileCollection TYPO3\CMS\Core\Resource\Collection\FolderBasedFileCollection TYPO3\CMS\Core\Resource\Collection\StaticFileCollection TYPO3\CMS\Core\Tests\Unit\Resource\Collection\Fixtures\OtherTestingFileCollection TYPO3\CMS\Core\Tests\Unit\Resource\Collection\Fixtures\TestingFileCollection

Public Member Functions

 setDescription ($description)
 
string key ()
 
array toArray ()
 
array getItems ()
 
 fromArray (array $array)
 
mixed getItemsCriteria ()
 
 setItemsCriteria ($itemsCriteria)
 
 add (FileInterface $data)
 
 addAll (CollectionInterface $other)
 
 remove (File $file)
 
 removeAll ()
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Core\Collection\AbstractRecordCollection
 __construct ()
 
T null current ()
 
 next ()
 
bool valid ()
 
 rewind ()
 
 __serialize ()
 
 __unserialize (array $arrayRepresentation)
 
int count ()
 
string getTitle ()
 
int getUid ()
 
string getDescription ()
 
 setTitle ($title)
 
string getItemTableName ()
 
 setItemTableName ($tableName)
 
 usort ($callbackFunction)
 
 moveItemAt ($currentPosition, $newPosition=0)
 
int getIdentifier ()
 
 setIdentifier ($id)
 
 persist ()
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Core\Collection\PersistableCollectionInterface
 loadContents ()
 

Protected Member Functions

string getItemUidList ($includeTableName=false)
 
array getPersistableDataArray ()
 

Protected Attributes

mixed $itemsCriteria
 
string $itemTableName = 'sys_file'
 
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Core\Collection\AbstractRecordCollection
int $uid = 0
 
string $title
 
string $description
 
string $itemTableName
 
SplDoublyLinkedList $storage
 

Static Protected Attributes

static string $storageTableName = 'sys_file_collection'
 
static string $type
 
static string $itemsCriteriaField
 
- ‪Static Protected Attributes inherited from ‪TYPO3\CMS\Core\Collection\AbstractRecordCollection
static string $storageItemsField = 'items'
 
static string $storageTableName = ''
 

Additional Inherited Members

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

Detailed Description

Abstract collection. <FileInterface>

Definition at line 27 of file AbstractFileCollection.php.

Member Function Documentation

◆ add()

◆ addAll()

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

Adds all files of another collection to the current one.

Definition at line 196 of file AbstractFileCollection.php.

References TYPO3\CMS\Core\Resource\Collection\AbstractFileCollection\add().

◆ fromArray()

TYPO3\CMS\Core\Resource\Collection\AbstractFileCollection::fromArray ( array  $array)

Similar to method in \TYPO3\CMS\Core\Collection\AbstractRecordCollection, but without $this->itemTableName= $array['table_name'], but with $this->storageItemsFieldContent = $array[self::$storageItemsField];

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

Reimplemented in TYPO3\CMS\Core\Resource\Collection\FolderBasedFileCollection.

Definition at line 157 of file AbstractFileCollection.php.

References TYPO3\CMS\Redirects\Message\description.

◆ getItems()

array TYPO3\CMS\Core\Resource\Collection\AbstractFileCollection::getItems ( )

Gets the current available items.

Returns
‪array

Definition at line 142 of file AbstractFileCollection.php.

◆ getItemsCriteria()

mixed TYPO3\CMS\Core\Resource\Collection\AbstractFileCollection::getItemsCriteria ( )

◆ getItemUidList()

string TYPO3\CMS\Core\Resource\Collection\AbstractFileCollection::getItemUidList (   $includeTableName = false)
protected

Generates comma-separated list of entry uids for usage in DataHandler

Parameters
bool$includeTableName
Returns
‪string

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

Definition at line 90 of file AbstractFileCollection.php.

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

◆ getPersistableDataArray()

array TYPO3\CMS\Core\Resource\Collection\AbstractFileCollection::getPersistableDataArray ( )
protected

◆ key()

string TYPO3\CMS\Core\Resource\Collection\AbstractFileCollection::key ( )

Return the key of the current element

Returns
‪string

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

Definition at line 77 of file AbstractFileCollection.php.

◆ remove()

TYPO3\CMS\Core\Resource\Collection\AbstractFileCollection::remove ( File  $file)

Removes a file from this collection.

Definition at line 207 of file AbstractFileCollection.php.

◆ removeAll()

TYPO3\CMS\Core\Resource\Collection\AbstractFileCollection::removeAll ( )

Removes all elements of the current collection.

Definition at line 223 of file AbstractFileCollection.php.

◆ setDescription()

TYPO3\CMS\Core\Resource\Collection\AbstractFileCollection::setDescription (   $description)

Sets the description.

Parameters
string$description

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

Definition at line 67 of file AbstractFileCollection.php.

References TYPO3\CMS\Core\Collection\AbstractRecordCollection\$description, and TYPO3\CMS\Redirects\Message\description.

◆ setItemsCriteria()

TYPO3\CMS\Core\Resource\Collection\AbstractFileCollection::setItemsCriteria (   $itemsCriteria)

Sets the items criteria.

Parameters
mixed$itemsCriteria

Definition at line 180 of file AbstractFileCollection.php.

References TYPO3\CMS\Core\Resource\Collection\AbstractFileCollection\$itemsCriteria.

◆ toArray()

array TYPO3\CMS\Core\Resource\Collection\AbstractFileCollection::toArray ( )

Similar to method in \TYPO3\CMS\Core\Collection\AbstractRecordCollection, but without 'table_name' => $this->getItemTableName()

Returns
‪array

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

Definition at line 122 of file AbstractFileCollection.php.

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

Member Data Documentation

◆ $itemsCriteria

mixed TYPO3\CMS\Core\Resource\Collection\AbstractFileCollection::$itemsCriteria
protected

Field contents of $itemsCriteriaField. Defines which the items or search criteria for the items depending on the type (see self::$type above) of this file collection.

Definition at line 54 of file AbstractFileCollection.php.

Referenced by TYPO3\CMS\Core\Resource\Collection\AbstractFileCollection\getItemsCriteria(), and TYPO3\CMS\Core\Resource\Collection\AbstractFileCollection\setItemsCriteria().

◆ $itemsCriteriaField

string TYPO3\CMS\Core\Resource\Collection\AbstractFileCollection::$itemsCriteriaField
staticprotected

The name of the field items are handled with (usually either criteria, items or folder)

Definition at line 47 of file AbstractFileCollection.php.

◆ $itemTableName

string TYPO3\CMS\Core\Resource\Collection\AbstractFileCollection::$itemTableName = 'sys_file'
protected

Name of the table records of this collection are stored in

Definition at line 60 of file AbstractFileCollection.php.

◆ $storageTableName

string TYPO3\CMS\Core\Resource\Collection\AbstractFileCollection::$storageTableName = 'sys_file_collection'
staticprotected

The table name collections are stored to

Definition at line 33 of file AbstractFileCollection.php.

◆ $type

string TYPO3\CMS\Core\Resource\Collection\AbstractFileCollection::$type
staticprotected

The type of file collection (see \TYPO3\CMS\Core\Collection\RecordCollectionRepository::TYPE constants)

Definition at line 40 of file AbstractFileCollection.php.