W3cubDocs

/Drupal 8

public function ActiveTheme::__construct

public ActiveTheme::__construct(array $values)

Constructs an ActiveTheme object.

Parameters

array $values: The properties of the object, keyed by the names.

File

core/lib/Drupal/Core/Theme/ActiveTheme.php, line 91

Class

ActiveTheme
Defines a theme and its information needed at runtime.

Namespace

Drupal\Core\Theme

Code

public function __construct(array $values) {
  $values += [
    'path' => '',
    'engine' => 'twig',
    'owner' => 'twig',
    'stylesheets_remove' => [],
    'libraries' => [],
    'extension' => 'html.twig',
    'base_themes' => [],
    'regions' => [],
    'libraries_override' => [],
    'libraries_extend' => [],
  ];

  $this->name = $values['name'];
  $this->path = $values['path'];
  $this->engine = $values['engine'];
  $this->owner = $values['owner'];
  $this->styleSheetsRemove = $values['stylesheets_remove'];
  $this->libraries = $values['libraries'];
  $this->extension = $values['extension'];
  $this->baseThemes = $values['base_themes'];
  $this->regions = $values['regions'];
  $this->librariesOverride = $values['libraries_override'];
  $this->librariesExtend = $values['libraries_extend'];
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Theme!ActiveTheme.php/function/ActiveTheme::__construct/8.1.x