What is a Display type ?

Definition

A display type gives possibility to display a field in different views of a module.

When creating a field of a Uccello module, it is possible to assign it a display type that will automatically display or hide it in the different views of the application.

Display types are defined in the vendor/uccello/uccello/app/Fields/Displaytype folder.

Default Display types

Here is the list of the native display types available with Uccello:

Example of a migration file

<?php
...

// Creation of the field
$field = Field::create([
    'name' => 'name',
    'uitype_id' => uitype('text')->id,
    'displaytype_id' => displaytype('everywhere')->id, // Use of the everywhere display type
    'sequence' => 0,
    'block_id' => $block->id,
    'module_id' => $module->id
]);

'displaytype_id' => displaytype('everywhere')->id : The field uses the everywhere display type.

Last updated