.. include:: /Includes.rst.txt .. _columns-user: type = 'user' ------------- .. _columns-user-introduction: Introduction ============ Allows to render a whole form field by a developer defined class method. .. note:: type='user' is outdated and currently mostly only kept for compatibility reasons. The 'renderType' approach which can be extended by extensions is much more powerful. See :ref:`FormEngine ` for details. .. _columns-user-examples: Examples ======== .. figure:: ../../Images/TypeUserExample.png :alt: A sample user-defined field :class: with-shadow A sample user-defined field TCA configuration: .. code-block:: php 'tx_examples_special' => [ 'label' => 'LLL:EXT:examples/Resources/Private/Language/locallang_db.xlf:fe_users.tx_examples_special', 'config' => [ 'type' => 'user', 'userFunc' => Documentation\Examples\Userfuncs\Tca::class . '->specialField', 'parameters' => [ 'color' => 'blue' ], ], ], This is how the corresponding PHP method in class :php:`\Documentation\Examples\Userfuncs\Tca` looks like: .. code-block:: php public function specialField($PA, $fObj) { $color = (isset($PA['parameters']['color'])) ? $PA['parameters']['color'] : 'red'; $formField = '
'; $formField .= '