diff options
author | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2016-01-30 20:13:41 +0100 |
---|---|---|
committer | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2016-01-30 20:13:41 +0100 |
commit | 85c5bd7db2f39699299e11e246288d11382dae47 (patch) | |
tree | 5a4cf62d7ecd99e076506ee27942e2ef562ba261 /add_extbase_property.sh | |
parent | b9cb492f49b03a9cb4c4c4afb754ba9d4577a45e (diff) | |
download | extbase-generator-cli-85c5bd7db2f39699299e11e246288d11382dae47.tar.gz extbase-generator-cli-85c5bd7db2f39699299e11e246288d11382dae47.tar.bz2 extbase-generator-cli-85c5bd7db2f39699299e11e246288d11382dae47.zip |
Add support for automatic searchFields population
Diffstat (limited to 'add_extbase_property.sh')
-rwxr-xr-x | add_extbase_property.sh | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/add_extbase_property.sh b/add_extbase_property.sh index 07c614d..b431fef 100755 --- a/add_extbase_property.sh +++ b/add_extbase_property.sh @@ -73,8 +73,14 @@ default_value="${default_values["$typ"]}" ####################################################################################################################### -# $tca -sed -i "s/\('showRecordFieldList.*\)',\$/\1, $field',/" $tca_file +# TCA + +# The first sed command is a fix for extension_builder's trailing comma in searchFields +sed -i \ + -e "s/\('searchFields' => .*\),',/\1',/" \ + -e "s/\('searchFields.*\)',\$/\1,$field',/" \ + -e "s/\('showRecordFieldList.*\)',\$/\1, $field',/" \ + $tca_file # Place before the access tab, if that is available if grep --quiet -- '--div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.access' $tca_file; then @@ -107,8 +113,6 @@ sed -i "s/.*<\/body>/\t\t\t<trans-unit id=\"${field}.description\">\n\t\t\t\t<so #ext_tables.sql sed -i "s/CREATE TABLE ${tablename} (/&\n\n\t${field} ${sql_type},/" ext_tables.sql -# TODO: add to searchFields in ext_tables.php ? - #if grep --quient function sed -i "\$s#^#\n\ |