sourcebroker/fieldgenerator
Allows to create content of one field based on other fields. Controlled fully by TCA. Support for extbase nested properties.
Maintainers
Package info
github.com/sourcebroker/fieldgenerator
Type:typo3-cms-extension
pkg:composer/sourcebroker/fieldgenerator
Requires
- typo3/cms-core: >=6.2.0,<7.6.99
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
GPL-2.0+ 7381b1a7478460d72bed37b68af63b68324656db
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_recipeFor all tables:
php ./typo3/cli_dispatch.phpsh extbase fieldgenerator:generateforalltables
TODO
- Remove need to set the repositoryClass in TCA config of "fieldsGenerator" section.
