You are here

function file_theme in Drupal 8

Same name and namespace in other branches
  1. 7 modules/file/file.module \file_theme()
  2. 9 core/modules/file/file.module \file_theme()

Implements hook_theme().

File

core/modules/file/file.module, line 653
Defines a "managed_file" Form API field and a "file" field for Field module.

Code

function file_theme() {
  return [
    // From file.module.
    'file_link' => [
      'variables' => [
        'file' => NULL,
        'description' => NULL,
        'attributes' => [],
      ],
    ],
    'file_managed_file' => [
      'render element' => 'element',
    ],
    'file_audio' => [
      'variables' => [
        'files' => [],
        'attributes' => NULL,
      ],
    ],
    'file_video' => [
      'variables' => [
        'files' => [],
        'attributes' => NULL,
      ],
    ],
    // From file.field.inc.
    'file_widget_multiple' => [
      'render element' => 'element',
      'file' => 'file.field.inc',
    ],
    'file_upload_help' => [
      'variables' => [
        'description' => NULL,
        'upload_validators' => NULL,
        'cardinality' => NULL,
      ],
      'file' => 'file.field.inc',
    ],
  ];
}