Feature #38773
Add Category Collection
| Status: | Resolved | Start date: | 2012-07-09 | |
|---|---|---|---|---|
| Priority: | Should have | Due date: | ||
| Assignee: | Fabien Udriot | % Done: | 100% |
|
| Category: | - | |||
| Target version: | 6.0.0-alpha3 | |||
| TYPO3 Version: | 6.0 | Complexity: | ||
| PHP Version: | ||||
| Votes: | 0 |
Description
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.
Related issues
| related to Extbase MVC Framework - Bug #43074: Use of category model causes an SqlException | Resolved | 2012-11-18 | ||
| related to Core - Bug #44961: Categorization in core is not usable in frontend | New | 2013-01-30 |
Associated revisions
[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
History
Updated by Fabien Udriot 11 months ago
- Subject changed from Add Collection support for Category to Add Category Collection
Updated by Fabien Udriot 11 months ago
Current implementation enables to write:
$collection = t3lib_div::makeInstance(
't3lib_category_Collection_CategoryCollection',
'tt_content'
);
$collection->setIdentifier(4); // would be a category uid = 4
$collection->loadContents(); // would load the items
$collection->getItems(); // would return all tt_content items categorized by category.uid = 4
$collection->rewind(); // would set the cursor at the beginning
$item = $collection->current(); // would return the first item of the collection
Updated by Gerrit Code Review 10 months ago
- Status changed from New to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/12791
Updated by Gerrit Code Review 10 months ago
Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/12791
Updated by Gerrit Code Review 10 months ago
Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/12791
Updated by Gerrit Code Review 10 months ago
Patch set 4 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/12791
Updated by Gerrit Code Review 9 months ago
Patch set 5 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/12791
Updated by Fabien Udriot 9 months ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 2f03297c7c48f01e1cd19d2520e7fcd1c80515b5.