Uuid

New in version 12.3

The TCA type uuid has been introduced.

When using the uuid type, TYPO3 takes care of generating the according database field. A developer does not need to define this field in an extension's ext_tables.sql file.

The main purpose of the TCA type uuid is to simplify the TCA configuration when working with fields containing a UUID.

Table of contents

Example

An example configuration looks like the following:

<?php

$uuidField = [
    'label' => 'My record identifier',
    'config' => [
        'type' => 'uuid',
        'version' => 6,
    ],
];
Copied!

Properties of the TCA column type uuid

Name Type Scope
boolean Display
boolean Display / Proc.
integer Display
integer Display

enableCopyToClipboard

enableCopyToClipboard
Type
boolean
Path
$GLOBALS['TCA'][$table]['columns'][$field]['config']
Scope
Display

In case enableCopyToClipboard is set to true, which is the default, a button is rendered next to the input field, which allows to copy the UUID to the clipboard of the operating system.

This column configuration can be overwritten by page TSconfig.

fieldInformation

fieldInformation

For details see fieldInformation.

required

required
Type
boolean
Path
$GLOBALS['TCA'][$table]['columns'][$field]['config']
Scope
Display / Proc.
Default
false

If set to true a non-empty value is required in the field. Otherwise the form cannot be saved.

size

size
Type
integer
Path
$GLOBALS['TCA'][$table]['columns'][$field]['config']
Scope
Display

Abstract value for the width of the <input> field. To set the field to the full width of the form area, use the value 50. Minimum is 10. Default is 30.

This column configuration can be overwritten by page TSconfig.

version

version
Type
integer
Path
$GLOBALS['TCA'][$table]['columns'][$field]['config']
Scope
Display

The version option defines the UUID version to be used. Allowed values are 4, 6 or 7. The default is 4. For more information about the different versions, have a look at the corresponding Symfony documentation.