> diff --git a/eu_cookie_compliance.services.yml b/eu_cookie_compliance.services.yml > index 321131a..a0d37d1 100644 > --- a/eu_cookie_compliance.services.yml > +++ b/eu_cookie_compliance.services.yml > @@ -9,6 +9,7 @@ services: > class: Drupal\eu_cookie_compliance\EventSubscriber\EuCookieComplianceConfigEventsSubscriber > tags: > - { name: event_subscriber } > + arguments: ['@file_system', '@file.repository', '@messenger'] > eu_cookie_compliance.clear_cache: > class: Drupal\eu_cookie_compliance\Plugin\EuCcClearCache > arguments: ['@module_handler', '@language_manager', '@entity_type.manager', '@extension.list.theme', '@cache.render'] 2c14 < index 618fdb3..4eca30d 100644 --- > index 618fdb3..cfdc890 100644 15c27 < @@ -16,8 +19,56 @@ use Drupal\Component\Serialization\Json; --- > @@ -16,8 +19,45 @@ use Drupal\Component\Serialization\Json; 58,68d69 < + /** < + * {@inheritdoc} < + */ < + public static function create(ContainerInterface $container) { < + return new static( < + $container->get('file_system'), < + $container->get('file.repository'), < + $container->get('messenger') < + ); < + } < + 72c73 < @@ -47,8 +98,7 @@ class EuCookieComplianceConfigEventsSubscriber implements EventSubscriberInterfa --- > @@ -47,8 +87,7 @@ class EuCookieComplianceConfigEventsSubscriber implements EventSubscriberInterfa 82c83 < @@ -56,13 +106,12 @@ class EuCookieComplianceConfigEventsSubscriber implements EventSubscriberInterfa --- > @@ -56,13 +95,12 @@ class EuCookieComplianceConfigEventsSubscriber implements EventSubscriberInterfa 99c100 < index d55ba97..f3a7176 100755 --- > index d55ba97..49921a1 100755 102c103 < @@ -6,6 +6,8 @@ use Drupal\Core\Access\AccessResult; --- > @@ -6,6 +6,9 @@ use Drupal\Core\Access\AccessResult; 107a109 > +use Drupal\Core\Plugin\ContainerFactoryPluginInterface; 111c113,115 < @@ -17,6 +19,32 @@ use Drupal\Core\Url; --- > @@ -15,7 +18,37 @@ use Drupal\Core\Url; > * admin_label = @Translation("EU Cookie Compliance Button Block") > * ) 113,114c117,119 < class CookieSettingsButtonBlock extends BlockBase { < --- > -class CookieSettingsButtonBlock extends BlockBase { > +class CookieSettingsButtonBlock extends BlockBase implements ContainerFactoryPluginInterface { > + 128c133,134 < + public function __construct(ConfigFactoryInterface $config_factory) { --- > + public function __construct( array $configuration, $plugin_id, $plugin_definition, ConfigFactoryInterface $config_factory) { > + parent::__construct($configuration, $plugin_id, $plugin_definition); 135c141 < + public static function create(ContainerInterface $container) { --- > + public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) { 136a143,145 > + $configuration, > + $plugin_id, > + $plugin_definition, 140c149 < + --- > 143,144c152 < */ < @@ -28,7 +56,7 @@ class CookieSettingsButtonBlock extends BlockBase { --- > @@ -28,7 +61,7 @@ class CookieSettingsButtonBlock extends BlockBase {