function FilteredPluginManagerTrait::themeManager

Wraps the theme manager.

Return value

\Drupal\Core\Theme\ThemeManagerInterface The theme manager.

1 method overrides FilteredPluginManagerTrait::themeManager()
TestFilteredPluginManager::themeManager in core/tests/Drupal/Tests/Core/Plugin/FilteredPluginManagerTraitTest.php
Wraps the theme manager.

File

core/lib/Drupal/Core/Plugin/FilteredPluginManagerTrait.php, line 67

Class

FilteredPluginManagerTrait
Provides a trait for plugin managers that allow filtering plugin definitions.

Namespace

Drupal\Core\Plugin

Code

protected function themeManager() {
  if (property_exists($this, 'themeManager') && $this->themeManager instanceof ThemeManagerInterface) {
    return $this->themeManager;
  }
  return \Drupal::service('theme.manager');
}

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