TYPO3  7.6
Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | List of all members
CategoryCollection Class Reference
Inheritance diagram for CategoryCollection:
CategoryCollection AbstractRecordCollection EditableCollectionInterface RecordCollectionInterface PersistableCollectionInterface SortableCollectionInterface CollectionInterface NameableCollectionInterface

Static Public Member Functions

static load ($id, $fillItems=false, $tableName= '', $fieldName= '')
 
- Static Public Member Functions inherited from CategoryCollection
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 ()
 
- Protected Member Functions inherited from CategoryCollection
 getCollectedRecords ()
 
 getPersistableDataArray ()
 
- Protected Member Functions inherited from AbstractRecordCollection
 getPersistableDataArray ()
 
 getItemUidList ($includeTableName=true)
 

Static Protected Member Functions

static getTypoScriptFrontendController ()
 
static getDatabaseConnection ()
 
- Static Protected Member Functions inherited from CategoryCollection
static getDatabaseConnection ()
 

Additional Inherited Members

- Public Member Functions inherited from CategoryCollection
 __construct ($tableName=null, $fieldName=null)
 
 loadContents ()
 
 add ($data)
 
 addAll (CollectionInterface $other)
 
 remove ($data)
 
 removeAll ()
 
 setRelationFieldName ($field)
 
 getRelationFieldName ()
 
- Protected Attributes inherited from CategoryCollection
 $relationFieldName = 'categories'
 
- Static Protected Attributes inherited from CategoryCollection
static $storageTableName = 'sys_category'
 

Detailed Description

Extend category collection for the frontend, to collect related records while respecting language, enable fields, etc.

Definition at line 23 of file frontend/Classes/Category/Collection/CategoryCollection.php.

Member Function Documentation

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

Overrides its parent method to implement usage of language, enable fields, etc. Also performs overlays.

Returns
array

Definition at line 85 of file frontend/Classes/Category/Collection/CategoryCollection.php.

References $GLOBALS, AbstractRecordCollection\getIdentifier(), AbstractRecordCollection\getItemTableName(), and CategoryCollection\getRelationFieldName().

static getDatabaseConnection ( )
staticprotected

Returns the database connection

Returns

Definition at line 174 of file frontend/Classes/Category/Collection/CategoryCollection.php.

References $GLOBALS.

static getTypoScriptFrontendController ( )
staticprotected

Gets the TSFE object.

Returns

Definition at line 164 of file frontend/Classes/Category/Collection/CategoryCollection.php.

References $GLOBALS.

static load (   $id,
  $fillItems = false,
  $tableName = '',
  $fieldName = '' 
)
static

Loads the collection with the given id from persistence For memory reasons, only data for the collection itself is loaded by default. Entries can be loaded on first access or straightaway using the $fillItems flag.

Overrides the parent method because of the call to "self::create()" which otherwise calls up

Parameters
int$idId of database record to be loaded
bool$fillItemsPopulates the entries directly on load, might be bad for memory on large collections
string$tableNamethe table name
string$fieldNameName of the categories relation field
Returns

Definition at line 63 of file frontend/Classes/Category/Collection/CategoryCollection.php.

Referenced by CategoryMenuUtility\collectPages(), RecordsContentObject\collectRecordsFromCategories(), and CategoriesViewHelper\findByCategories().