'', 'engine' => 'twig', 'owner' => 'twig', 'logo' => '', 'libraries' => [], 'extension' => 'html.twig', 'base_theme_extensions' => [], 'regions' => [], 'libraries_override' => [], 'libraries_extend' => [], ]; $this->name = $values['name']; $this->logo = $values['logo']; $this->path = $values['path']; $this->engine = $values['engine']; $this->owner = $values['owner']; $this->libraries = $values['libraries']; $this->extension = $values['extension']; $this->baseThemeExtensions = $values['base_theme_extensions']; $this->regions = $values['regions']; $this->librariesOverride = $values['libraries_override']; $this->librariesExtend = $values['libraries_extend']; } /** * Returns the machine name of the theme. * * @return string */ public function getName() { return $this->name; } /** * Returns the path to the theme directory. * * @return string */ public function getPath() { return $this->path; } /** * Returns the theme engine. * * @return string */ public function getEngine() { return $this->engine; } /** * Returns the path to the theme engine for root themes. * * @see \Drupal\Core\Extension\ThemeExtensionList::doList() * * @return mixed */ public function getOwner() { return $this->owner; } /** * Returns the extension object. * * @return \Drupal\Core\Extension\Extension */ public function getExtension() { return $this->extension; } /** * Returns the libraries provided by the theme. * * @return mixed */ public function getLibraries() { return $this->libraries; } /** * Returns an array of base theme extension objects keyed by name. * * The order starts with the base theme of $this and ends with the root of * the dependency chain. For most use cases, parent themes are expected to * be called first, so this order needs to be reversed with array_reverse() * * @return \Drupal\Core\Extension\Extension[] */ public function getBaseThemeExtensions() { return $this->baseThemeExtensions; } /** * Returns the logo provided by the theme. * * @return string * The logo path. */ public function getLogo() { return $this->logo; } /** * The regions used by the theme. * * @return string[] * The list of region machine names supported by the theme. * * @see system_region_list() */ public function getRegions() { return array_keys($this->regions); } /** * Returns the libraries or library assets overridden by the active theme. * * @return array * The list of libraries overrides. */ public function getLibrariesOverride() { return $this->librariesOverride; } /** * Returns the libraries extended by the active theme. * * @return array * The list of libraries-extend definitions. */ public function getLibrariesExtend() { return $this->librariesExtend; } }