![]() |
TYPO3
7.6
|
Public Member Functions | |
__construct () | |
add ($extensionKey, $tableName, $fieldName= 'categories', array $options=array(), $override=false) | |
getExtensionKeys () | |
getCategorizedTables () | |
getCategoryFieldsForTable (array &$configuration) | |
isRegistered ($tableName, $fieldName= 'categories') | |
getDatabaseTableDefinitions () | |
getDatabaseTableDefinition ($extensionKey) | |
applyTcaForPreRegisteredTables () | |
addCategoryDatabaseSchemaToTablesDefinition (array $sqlString) | |
addExtensionCategoryDatabaseSchemaToTablesDefinition (array $sqlString, $extensionKey) | |
Static Public Member Functions | |
static | getInstance () |
static | getTcaFieldConfiguration ($tableName, $fieldName= 'categories', array $fieldConfigurationOverride=array()) |
Protected Member Functions | |
applyTcaForTableAndField ($tableName, $fieldName) | |
registerDefaultCategorizedTables () | |
addToAllTCAtypes ($tableName, $fieldName, array $options) | |
addCategoryTab ($tableName, $fieldName) | |
addTcaColumn ($tableName, $fieldName, array $options) | |
getLanguageService () | |
remove ($tableName, $fieldName) | |
Protected Attributes | |
$registry = array() | |
$extensions = array() | |
$addedCategoryTabs = array() | |
$template = '' | |
Class to register category configurations.
Definition at line 26 of file CategoryRegistry.php.
__construct | ( | ) |
Creates this object.
Definition at line 61 of file CategoryRegistry.php.
add | ( | $extensionKey, | |
$tableName, | |||
$fieldName = 'categories' , |
|||
array | $options = array() , |
||
$override = false |
|||
) |
Adds a new category configuration to this registry. TCA changes are directly applied
string | $extensionKey | Extension key to be used |
string | $tableName | Name of the table to be registered |
string | $fieldName | Name of the field to be registered |
array | $options | Additional configuration options
|
bool | $override | If TRUE, any category configuration for the same table / field is removed before the new configuration is added |
\InvalidArgumentException | |
\RuntimeException |
Definition at line 85 of file CategoryRegistry.php.
References $GLOBALS, CategoryRegistry\applyTcaForTableAndField(), CategoryRegistry\isRegistered(), and ExtensionManagementUtility\loadNewTcaColumnsConfigFiles().
Referenced by CategoryRegistry\registerDefaultCategorizedTables().
addCategoryDatabaseSchemaToTablesDefinition | ( | array | $sqlString | ) |
A slot method to inject the required category database fields to the tables definition string
array | $sqlString |
Definition at line 444 of file CategoryRegistry.php.
References CategoryRegistry\getDatabaseTableDefinitions(), and CategoryRegistry\registerDefaultCategorizedTables().
|
protected |
Creates the 'fieldList' string for $fieldName which includes a categories tab. But only one categories tab is added per table.
string | $tableName | |
string | $fieldName |
Definition at line 309 of file CategoryRegistry.php.
Referenced by CategoryRegistry\addToAllTCAtypes().
addExtensionCategoryDatabaseSchemaToTablesDefinition | ( | array | $sqlString, |
$extensionKey | |||
) |
A slot method to inject the required category database fields of an extension to the tables definition string
array | $sqlString | |
string | $extensionKey |
Definition at line 459 of file CategoryRegistry.php.
References CategoryRegistry\getDatabaseTableDefinition().
|
protected |
Add a new TCA Column
string | $tableName | Name of the table to be categorized |
string | $fieldName | Name of the field to be used to store categories |
array | $options | Additional configuration options
|
Definition at line 333 of file CategoryRegistry.php.
References $GLOBALS, ExtensionManagementUtility\addTCAcolumns(), and GeneralUtility\inList().
Referenced by CategoryRegistry\applyTcaForTableAndField().
|
protected |
Add a new field into the TCA types -> showitem
string | $tableName | Name of the table to be categorized |
string | $fieldName | Name of the field to be used to store categories |
array | $options | Additional configuration options
|
Definition at line 275 of file CategoryRegistry.php.
References $GLOBALS, CategoryRegistry\addCategoryTab(), and ExtensionManagementUtility\addToAllTCAtypes().
Referenced by CategoryRegistry\applyTcaForTableAndField().
applyTcaForPreRegisteredTables | ( | ) |
Apply TCA to all registered tables
Definition at line 223 of file CategoryRegistry.php.
References CategoryRegistry\applyTcaForTableAndField(), and CategoryRegistry\registerDefaultCategorizedTables().
|
protected |
Applies the additions directly to the TCA
string | $tableName | |
string | $fieldName |
Definition at line 239 of file CategoryRegistry.php.
References CategoryRegistry\addTcaColumn(), and CategoryRegistry\addToAllTCAtypes().
Referenced by CategoryRegistry\add(), and CategoryRegistry\applyTcaForPreRegisteredTables().
getCategorizedTables | ( | ) |
getCategoryFieldsForTable | ( | array & | $configuration | ) |
Returns a list of category fields for a given table for populating selector "category_field" in tt_content table (called as itemsProcFunc).
array | $configuration | Current field configuration |
\UnexpectedValueException |
Definition at line 145 of file CategoryRegistry.php.
References $GLOBALS, elseif, and CategoryRegistry\getLanguageService().
getDatabaseTableDefinition | ( | $extensionKey | ) |
Generates table definitions for registered tables by an extension.
string | $extensionKey | Extension key to have the database definitions created for |
Definition at line 202 of file CategoryRegistry.php.
Referenced by CategoryRegistry\addExtensionCategoryDatabaseSchemaToTablesDefinition(), and CategoryRegistry\getDatabaseTableDefinitions().
getDatabaseTableDefinitions | ( | ) |
Generates tables definitions for all registered tables.
Definition at line 187 of file CategoryRegistry.php.
References CategoryRegistry\getDatabaseTableDefinition(), and CategoryRegistry\getExtensionKeys().
Referenced by CategoryRegistry\addCategoryDatabaseSchemaToTablesDefinition().
getExtensionKeys | ( | ) |
Gets all extension keys that registered a category configuration.
Definition at line 122 of file CategoryRegistry.php.
Referenced by CategoryRegistry\getDatabaseTableDefinitions().
|
static |
Returns a class instance
Definition at line 53 of file CategoryRegistry.php.
References GeneralUtility\makeInstance().
Referenced by ExtensionManagementUtility\buildBaseTcaFromSingleFiles().
|
protected |
Definition at line 468 of file CategoryRegistry.php.
References $GLOBALS.
Referenced by CategoryRegistry\getCategoryFieldsForTable().
|
static |
Get the config array for given table and field. This method does NOT take care of adding sql fields, adding the field to TCA types nor does it set the MM_oppositeUsage in the sys_category TCA. This has to be taken care of manually!
string | $tableName | The table name |
string | $fieldName | The field name (default categories) |
array | $fieldConfigurationOverride | Changes to the default configuration |
Definition at line 399 of file CategoryRegistry.php.
References ArrayUtility\mergeRecursiveWithOverrule().
isRegistered | ( | $tableName, | |
$fieldName = 'categories' |
|||
) |
Tells whether a table has a category configuration in the registry.
string | $tableName | Name of the table to be looked up |
string | $fieldName | Name of the field to be looked up |
Definition at line 177 of file CategoryRegistry.php.
Referenced by CategoryRegistry\add(), CategoryRegistry\registerDefaultCategorizedTables(), and CategoryRegistry\remove().
|
protected |
Add default categorized tables to the registry
Definition at line 250 of file CategoryRegistry.php.
References $GLOBALS, CategoryRegistry\add(), CategoryRegistry\isRegistered(), and GeneralUtility\trimExplode().
Referenced by CategoryRegistry\addCategoryDatabaseSchemaToTablesDefinition(), and CategoryRegistry\applyTcaForPreRegisteredTables().
|
protected |
Removes the given field in the given table from the registry if it is found.
string | $tableName | The name of the table for which the registration should be removed. |
string | $fieldName | The name of the field for which the registration should be removed. |
Definition at line 479 of file CategoryRegistry.php.
References CategoryRegistry\isRegistered().
|
protected |
Definition at line 41 of file CategoryRegistry.php.
|
protected |
Definition at line 36 of file CategoryRegistry.php.
|
protected |
Definition at line 31 of file CategoryRegistry.php.
|
protected |
Definition at line 46 of file CategoryRegistry.php.