function CurrentThemeCondition::__construct

Same name in other branches
  1. 8.9.x core/modules/system/src/Plugin/Condition/CurrentThemeCondition.php \Drupal\system\Plugin\Condition\CurrentThemeCondition::__construct()
  2. 10 core/modules/system/src/Plugin/Condition/CurrentThemeCondition.php \Drupal\system\Plugin\Condition\CurrentThemeCondition::__construct()
  3. 11.x core/modules/system/src/Plugin/Condition/CurrentThemeCondition.php \Drupal\system\Plugin\Condition\CurrentThemeCondition::__construct()

Constructs a CurrentThemeCondition condition plugin.

Parameters

array $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin_id for the plugin instance.

mixed $plugin_definition: The plugin implementation definition.

\Drupal\Core\Theme\ThemeManagerInterface $theme_manager: The theme manager.

\Drupal\Core\Extension\ThemeHandlerInterface $theme_handler: The theme handler.

Overrides ConditionPluginBase::__construct

File

core/modules/system/src/Plugin/Condition/CurrentThemeCondition.php, line 50

Class

CurrentThemeCondition
Provides a 'Current Theme' condition.

Namespace

Drupal\system\Plugin\Condition

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, ThemeManagerInterface $theme_manager, ThemeHandlerInterface $theme_handler) {
    parent::__construct($configuration, $plugin_id, $plugin_definition);
    $this->themeManager = $theme_manager;
    $this->themeHandler = $theme_handler;
}

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