function Theme::__construct

Same name in this branch
  1. 11.x core/lib/Drupal/Core/Updater/Theme.php \Drupal\Core\Updater\Theme::__construct()
Same name and namespace in other branches
  1. main core/lib/Drupal/Core/Extension/Theme.php \Drupal\Core\Extension\Theme::__construct()

Constructs a new Theme object.

Parameters

string $root: The app root.

string $pathname: The relative path and filename of the extension's info file; e.g., 'core/themes/olivero/olivero.info.yml'.

array $info: The info array parsed from the theme's .info.yml file.

string|null $filename: (optional) The filename of the main extension file; e.g., olivero.theme.

Overrides Extension::__construct

File

core/lib/Drupal/Core/Extension/Theme.php, line 36

Class

Theme
The Theme extension object.

Namespace

Drupal\Core\Extension

Code

public function __construct(string $root, string $pathname, array $info, ?string $filename = NULL) {
  parent::__construct($root, 'theme', $pathname, $filename);
  $this->info = $info;
}

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