public function Styleswitcher::__construct in Style Switcher 8.2
Same name and namespace in other branches
- 3.0.x src/Plugin/Block/Styleswitcher.php \Drupal\styleswitcher\Plugin\Block\Styleswitcher::__construct()
Constructs a new Styleswitcher.
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\Routing\RedirectDestinationInterface $redirect_destination: The Redirect Destination service.
\Drupal\Core\Config\ConfigFactoryInterface $config_factory: Configuration factory.
Overrides BlockPluginTrait::__construct
File
- src/
Plugin/ Block/ Styleswitcher.php, line 61
Class
- Styleswitcher
- Provides the Style Switcher block.
Namespace
Drupal\styleswitcher\Plugin\BlockCode
public function __construct(array $configuration, $plugin_id, $plugin_definition, ThemeManagerInterface $theme_manager, RedirectDestinationInterface $redirect_destination, ConfigFactoryInterface $config_factory) {
$this->themeManager = $theme_manager;
$this->redirectDestination = $redirect_destination;
$this->configFactory = $config_factory;
parent::__construct($configuration, $plugin_id, $plugin_definition);
}