function FieldUiHooks::theme

Implements hook_theme().

Attributes

#[Hook('theme')]

File

core/modules/field_ui/src/Hook/FieldUiHooks.php, line 77

Class

FieldUiHooks
Hook implementations for field_ui.

Namespace

Drupal\field_ui\Hook

Code

public function theme() : array {
  return [
    'field_ui_table' => [
      'variables' => [
        'header' => NULL,
        'rows' => NULL,
        'footer' => NULL,
        'attributes' => [],
        'caption' => NULL,
        'colgroups' => [],
        'sticky' => FALSE,
        'responsive' => TRUE,
        'empty' => '',
      ],
    ],
    // Provide a dedicated template for new storage options as their styling
    // is quite different from a typical form element, so it works best to not
    // include default form element classes.
'form_element__new_storage_type' => [
      'base hook' => 'form_element',
      'render element' => 'element',
    ],
  ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.