function UpdateThemeHooks::theme

Implements hook_theme().

Attributes

#[Hook('theme')]

File

core/modules/update/src/Hook/UpdateThemeHooks.php, line 39

Class

UpdateThemeHooks
Theme hooks for update module.

Namespace

Drupal\update\Hook

Code

public function theme() : array {
  return [
    'update_last_check' => [
      'initial preprocess' => static::class . ':preprocessUpdateLastCheck',
      'variables' => [
        'last' => 0,
      ],
    ],
    'update_report' => [
      'initial preprocess' => static::class . ':preprocessUpdateReport',
      'variables' => [
        'data' => NULL,
      ],
    ],
    'update_project_status' => [
      'initial preprocess' => static::class . ':preprocessUpdateProjectStatus',
      'variables' => [
        'project' => [],
      ],
    ],
    // We are using template instead of '#type' => 'table' here to keep markup
    // out of preprocess and allow for easier changes to markup.
'update_version' => [
      'initial preprocess' => static::class . ':preprocessUpdateVersion',
      'variables' => [
        'version' => NULL,
        'title' => NULL,
        'attributes' => [],
      ],
    ],
    'update_fetch_error_message' => [
      'initial preprocess' => static::class . ':preprocessUpdateFetchErrorMessage',
      'render element' => 'element',
      'variables' => [
        'error_message' => [],
      ],
    ],
  ];
}

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