[FEATURE] Add a Category Collection as part of the Category API
authorFabien Udriot <fabien.udriot@ecodev.ch>
Sat, 14 Jul 2012 13:14:43 +0000 (15:14 +0200)
committerOliver Hader <oliver.hader@typo3.org>
Sun, 19 Aug 2012 13:42:05 +0000 (15:42 +0200)
commit2f03297c7c48f01e1cd19d2520e7fcd1c80515b5
treee80a46a6ddda1603d62b97d4858473e566b13a0f
parent6b395f91f7f03b7cb6ef08087e42b908a8de1c6c
[FEATURE] Add a Category Collection as part of the Category API

Category should make use of the Collection API as a cornerstone for
fetching and storing records related to a category. The Abstract
Collection object implements various PHP Interfaces such as
Iterator, Serializable, Countable , etc... that the Collection
Category will inherit and make the developer happy.

Category Collection enables this code:

$categoryUid = 1;
$tableName = 'tt_content';
$collection = t3lib_category_Collection_CategoryCollection::load(
    $categoryUid, TRUE, $tableName);
echo $collection->count();

Change-Id: Ieac9ee0225595d01e539678284b18ecd35541138
Resolves: #38773
Releases: 6.0
Reviewed-on: http://review.typo3.org/12791
Reviewed-by: Susanne Moog
Tested-by: Susanne Moog
Reviewed-by: Fabien Udriot
Tested-by: Fabien Udriot
Reviewed-by: Oliver Hader
Reviewed-by: Christian Kuhn
Tested-by: Oliver Hader
t3lib/category/Collection/CategoryCollection.php [new file with mode: 0644]
t3lib/core_autoload.php
tests/Unit/t3lib/category/Collection/CategoryCollectionTest.php [new file with mode: 0644]