function SystemBrandingBlock::__construct
Creates a SystemBrandingBlock instance.
Overrides BlockPluginTrait::__construct
File
-
core/
modules/ system/ src/ Plugin/ Block/ SystemBrandingBlock.php, line 30
Class
- SystemBrandingBlock
- Provides a block to display 'Site branding' elements.
Namespace
Drupal\system\Plugin\BlockCode
public function __construct(array $configuration, $plugin_id, $plugin_definition, protected ConfigFactoryInterface $configFactory, protected ?ThemeSettingsProvider $themeSettingsProvider = NULL) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
if ($themeSettingsProvider === NULL) {
@trigger_error('Calling ' . __CLASS__ . ' constructor without the $themeSettingsProvider argument is deprecated in drupal:11.3.0 and it will be required in drupal:12.0.0. See https://www.drupal.org/project/drupal/issues/3035289', E_USER_DEPRECATED);
$this->themeSettingsProvider = \Drupal::service(ThemeSettingsProvider::class);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.