[TYPO3-irre] enableControls

Oliver Hader oliver at typo3.org
Mon May 26 20:55:12 CEST 2008


Hi Steffen,

Steffen Kamper schrieb:
> i discovered the enableControls-Array and the only possibility i saw is 
> using a hook.
> 
> Did i miss something, or is it possible to define this with TCA as well?
> 
> I tried 'inlineNewButtonStyle' => 'display:none;' but doesn't affec, seems 
> to be used only in a special case.
> 
> Reason: i want to deactivate "create record"-link and the delete link. Is 
> there a possibility to do so? Would be the easiest way to do something like
> 
> 'type' => 'inline',
> 'enableControls' => array (
>   'new' => false,
>   'delete' => false,
>  ),

You're right. This currently only works with implementing a hook which 
sets the enabled control items. But it would be possible to introduce a 
new appearance property like you mentioned:

'fieldname' => array(
   'label' => '...',
   'config' => array(
     'type' => 'inline',
     'foreign_table' => '...',
     'appearance' => array(
       'enabledControls' => array(
         'new' => false,
         'delete' => false,
       ),
     ),
   ),
),

The values in enabledControls would the be the initial value of that 
field and merged with all items to be true. Thus, if a control item was 
not explicitly set by the new appearance property, it's shown by default 
(like it's now).

olly
-- 
Oliver Hader
TYPO3 4.3 Release Manager


More information about the TYPO3-project-irre mailing list