function MediaHooks::theme

Implements hook_theme().

Attributes

#[Hook('theme')]

File

core/modules/media/src/Hook/MediaHooks.php, line 80

Class

MediaHooks
Hook implementations for media.

Namespace

Drupal\media\Hook

Code

public function theme() : array {
  return [
    'media' => [
      'render element' => 'elements',
    ],
    'media_reference_help' => [
      'render element' => 'element',
      'base hook' => 'field_multiple_value_form',
    ],
    'media_oembed_iframe' => [
      'variables' => [
        'resource' => NULL,
        'media' => NULL,
        'placeholder_token' => '',
      ],
    ],
    'media_embed_error' => [
      'variables' => [
        'message' => NULL,
        'attributes' => [],
      ],
    ],
  ];
}

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