[FEATURE] Add categorization into the Core
authorFabien Udriot <fabien.udriot@ecodev.ch>
Fri, 6 Jul 2012 12:34:54 +0000 (14:34 +0200)
committerSteffen Ritter <info@rs-websystems.de>
Fri, 13 Jul 2012 10:56:55 +0000 (12:56 +0200)
commitb5ba81a8fd9d33e8dfd0346f97db7e2f1997b0f4
treeb24a3c038d8fd28dbcf45072d6d5c155426b4d45
parent61892aa9b5533edb0b5115b08ef601cd8289566b
[FEATURE] Add categorization into the Core

A common use case in every advanced website is to be able to
categorize records. Besides that, there is the need to share
categories across records. So far, each extension has to bring
its own category implementation which is not an ideal situation.

To fill the gap, we would like to introduce a new category record
type along with an API where extension developers could register
their own tables to be categorized. The relations will be stored
within "mm" tables as a less time consuming approach.

This patch provides:

* SQL definition for "sys_category" and "sys_category_mm" with
  their TCA
* a registration mechanism where third party extension can have
  their SQL fields + TCA generated on the fly. This is done by
  using the Extension Manager method:

t3lib_extMgm::makeCategorizable(
  $extensionKey, $tableName,
  $fieldName = 'categories', $options = array()
);

Change-Id: I461252b6d5f6c6c4a4eb2c1942a66250cbb95aa9
Resolves: #38711
Releases: 6.0
Reviewed-on: http://review.typo3.org/12672
Reviewed-by: Fabien Udriot
Tested-by: Fabien Udriot
Reviewed-by: Marcus Schwemer
Tested-by: Marcus Schwemer
Reviewed-by: Dominik Mathern
Tested-by: Dominik Mathern
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
14 files changed:
t3lib/category/Registry.php [new file with mode: 0644]
t3lib/class.t3lib_extmgm.php
t3lib/core_autoload.php
t3lib/stddb/tables.php
t3lib/stddb/tables.sql
t3lib/stddb/tca_sys_category.php [new file with mode: 0644]
tests/Unit/t3lib/category/RegistryTest.php [new file with mode: 0644]
tests/Unit/t3lib/class.t3lib_extmgmTest.php
typo3/sysext/em/classes/install/class.tx_em_install.php
typo3/sysext/install/mod/class.tx_install.php
typo3/sysext/lang/locallang_tca.xlf
typo3/sysext/t3skin/images/icons/mimetypes/x-sys_category.png [new file with mode: 0644]
typo3/sysext/t3skin/images/sprites/t3skin.png
typo3/sysext/t3skin/stylesheets/sprites/t3skin.css