sourcebroker / fieldgenerator
Allows to create content of one field based on other fields. Controlled fully by TCA. Support for extbase nested properties.
Installs: 5 369
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 1
Open Issues: 0
Type:typo3-cms-extension
Requires
- typo3/cms-core: >=6.2.0,<7.6.99
This package is auto-updated.
Last update: 2024-10-19 20:23:15 UTC
README
This extension allows to create content of one field based on other fields. Controlled fully by TCA settings. Support for nested property read. Useful to create record keywords for nested structures.
Installation
Install the extension using composer composer require sourcebroker/fieldgenerator
.
Usage
-
Find TCA config you want to modify and add configuration. Example:
'fieldsGenerator' => [ 'repositoryClass' => SourceBroker\Recipes\Domain\Repository\RecipeRepository::class, 'generate' => [ 'keywords' => [ 'fields' => 'name,sections.steps.description,sections.ingredients.name', 'preg_replace' => [ 'pattern' => '/[:]/', 'replacement' => '' ] ] ] ],
-
The field is filled with content on record save (hook processDatamap_afterDatabaseOperations).
You can also use cli command to initial generation of fields:
For one table:
php ./typo3/cli_dispatch.phpsh extbase fieldgenerator:generatefortable tx_recipes_domain_model_recipe
For all tables:
php ./typo3/cli_dispatch.phpsh extbase fieldgenerator:generateforalltables
TODO
- Remove need to set the repositoryClass in TCA config of "fieldsGenerator" section.