Pass through / virtual field
Table of contents:
Introduction
There are three columns config types that do similar things but still have subtle differences between them. These are the none type, the passthrough type and the user type.
Characteristics of passthrough
:
- A value sent to the
Data
is kept as is and put into the database field. However, the default TYPO3 backend forms never send data for aHandler passthrough
field. - Unlike the field type
none
, the field typepassthrough
must have a database field. - The TYPO3 backend forms do not render anything for
passthrough
fields by default. But they can be combined with a customrender
to display something. A field of typeType user
is better suited for such use cases, though. - Values of
passthrough
fields are usually not rendered at other places in the backend. - Field updates by the
Data
get logged and the history/undo function will work with such values.Handler
The passthrough
field can be useful, if:
- A field needs no rendering, but some data handling using hooks of the
Data
.Handler - The passthrough type is used by TYPO3 core to handle meta data on records rows that are not shown as fields
if editing records and only have data logic attached to it. An example is the
l10n_
field whose data is rendered differently in FormEngine at other places if editing a record but still updated and handled by thediffsource Data
.Handler
Typical usages of the field type passthrough
is a field that only needs data evaluation on the Data
side, but
no rendering definition. The Data
does not evaluate the value in any way by default.
Since there is no rendering mode for this field type it is specifically fitted for direct API usage with the Data
.
Examples
This field is found in a number of tables, for instance the "pages" table. It is used by the system extension "impexp" to store some information.
'tx_impexp_origuid' => [
'config' => [
'type' => 'passthrough'
],
],