[TYPO3-core] RFC #16334: Make FlexForms editable via TSConfig and group access lists

Jeff Segars jsegars at alumni.rice.edu
Mon Nov 15 19:38:08 CET 2010


On 11/10/10 9:51 AM, Kai Vogel wrote:
> Hey all,
>
> this is a SVN patch request.
>
> Type: feature
>
> Branch: trunk
>
> BT reference:
> http://bugs.typo3.org/view.php?id=16334
>
> Problem:
> It's not possible to edit FlexForms afterwards without changing original
> extension files directly.
>
> Solution:
> The patch adds a new class "t3lib_TCEforms_Flexforms" and makes some
> small changes in "t3lib_tceforms" and "t3lib_transferdata" to make
> FlexForms editable like normal TCA forms via page TSConfig and group
> access lists. An overview of the syntax can be found in the bug /
> feature request.
>
> Best regards

Thanks for the patch Kai!  I've wished we had this feature available for 
a long time.  I've reviewed the patch and agree with Steffen that you 
really produced some clean code :) I do have some questions and some 
small suggestions...I know there are a lot of questions here, but I'm 
happy to help you out with updates to the patch if you'd like.

* It looks like Flexform fields are removed if they are set in the 
Allowed Exclude Fields, which is the opposite of how it works for other 
records. This should be reversed, right?

* In getExcludeFields(), there's a check for TCEforms.exclude that is 
commented out? When and how should this be enabled? (Note: If the 
previous item is reversed, then the exclude setting should be turned on 
immediately and the Allowed Exclude Fields will only affect extensions 
that have been updated for 4.5)

* When flexforms are added to the list of exclude fields, the naming can 
be a little problematic because the FlexForm is named "News" and there 
is already another table with that name too.  Would it be a good idea to 
add "Plugin" on the end or something like that?

* In getRegisteredFlexForms(), we loop over all loaded extensions and 
try to find one that matches the current FlexForm key. When a match is 
found, the extension key is unset. Doesn't this mean that an extension 
with two flexforms will only have the first registered?

* It appears that the TSConfig naming conventions also assume one 
FlexForm per extension.  Do you have any ideas on how to support multiple?

* In getExtensionKeyByPluginRecord(), it seems like the mapping can be 
error prone. For example, if I have rowKey for an extension like 
"pt_list" then the extension key can end up mapped to the backend "list" 
extension rather than pt_list

* According to the CGL, its suggested that you don't assign values 
inside a condition, but if it really makes sense then there should be 
surrounded by an extra set of parenthesis to make it clear.  This 
happens several places in the patch, so just a general heads up. It's a 
very minor thing though :)

* In modifySingleFlexFormSheet when looping through the fields, there's 
a check for select fields.  If its not a select field, then we proceed 
to the next field via "continue".  I think this "continue" is easy to 
miss when reading the code, so an extra comment might help or you could 
place all the select code inside the if statement for easier 
readability.  Another minor thing :)

Thanks again for the patch!
Jeff


More information about the TYPO3-team-core mailing list