diff --git a/src/Form/AppearanceForm.php b/src/Form/AppearanceForm.php index 31d3bfb..466cb89 100644 --- a/src/Form/AppearanceForm.php +++ b/src/Form/AppearanceForm.php @@ -3,6 +3,7 @@ namespace Drupal\ucb_site_configuration\Form; use Drupal\Core\Config\ConfigFactoryInterface; +use Drupal\Core\Config\TypedConfigManagerInterface; use Drupal\Core\File\FileSystemInterface; use Drupal\Core\Form\ConfigFormBase; use Drupal\Core\Form\FormStateInterface; @@ -50,8 +51,8 @@ class AppearanceForm extends ConfigFormBase { * @param \Drupal\ucb_site_configuration\SiteConfiguration $service * The site configuration service defined in this module. */ - public function __construct(ConfigFactoryInterface $config_factory, FileSystemInterface $file_system, AccountInterface $user, SiteConfiguration $service) { - parent::__construct($config_factory); + public function __construct(ConfigFactoryInterface $config_factory, TypedConfigManagerInterface $typed_config_manager, FileSystemInterface $file_system, AccountInterface $user, SiteConfiguration $service) { + parent::__construct($config_factory, $typed_config_manager); $this->fileSystem = $file_system; $this->user = $user; $this->service = $service; @@ -68,6 +69,7 @@ public function __construct(ConfigFactoryInterface $config_factory, FileSystemIn public static function create(ContainerInterface $container) { return new static( $container->get('config.factory'), + $container->get('config.typed'), $container->get('file_system'), $container->get('current_user'), $container->get('ucb_site_configuration') diff --git a/src/Form/ContentTypesForm.php b/src/Form/ContentTypesForm.php index 3622d14..2e1bb63 100644 --- a/src/Form/ContentTypesForm.php +++ b/src/Form/ContentTypesForm.php @@ -3,6 +3,7 @@ namespace Drupal\ucb_site_configuration\Form; use Drupal\Core\Config\ConfigFactoryInterface; +use Drupal\Core\Config\TypedConfigManagerInterface; use Drupal\Core\Entity\EntityTypeManagerInterface; use Drupal\Core\Form\ConfigFormBase; use Drupal\Core\Form\FormStateInterface; @@ -38,8 +39,8 @@ class ContentTypesForm extends ConfigFormBase { * @param \Drupal\ucb_site_configuration\SiteConfiguration $service * The site configuration service defined in this module. */ - public function __construct(ConfigFactoryInterface $config_factory, EntityTypeManagerInterface $entityTypeManager, SiteConfiguration $service) { - parent::__construct($config_factory); + public function __construct(ConfigFactoryInterface $config_factory, TypedConfigManagerInterface $typed_config_manager, EntityTypeManagerInterface $entityTypeManager, SiteConfiguration $service) { + parent::__construct($config_factory, $typed_config_manager); $this->entityTypeManager = $entityTypeManager; $this->service = $service; } @@ -55,6 +56,7 @@ public function __construct(ConfigFactoryInterface $config_factory, EntityTypeMa public static function create(ContainerInterface $container) { return new static( $container->get('config.factory'), + $container->get('config.typed'), $container->get('entity_type.manager'), $container->get('ucb_site_configuration') ); diff --git a/src/Form/GeneralForm.php b/src/Form/GeneralForm.php index c95b252..df154f7 100644 --- a/src/Form/GeneralForm.php +++ b/src/Form/GeneralForm.php @@ -3,6 +3,7 @@ namespace Drupal\ucb_site_configuration\Form; use Drupal\Core\Config\ConfigFactoryInterface; +use Drupal\Core\Config\TypedConfigManagerInterface; use Drupal\Core\Form\ConfigFormBase; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Path\PathValidatorInterface; @@ -68,8 +69,8 @@ class GeneralForm extends ConfigFormBase { * @param \Drupal\ucb_site_configuration\SiteConfiguration $service * The site configuration service defined in this module. */ - public function __construct(ConfigFactoryInterface $config_factory, AliasManagerInterface $alias_manager, PathValidatorInterface $path_validator, RequestContext $request_context, AccountInterface $user, SiteConfiguration $service) { - parent::__construct($config_factory); + public function __construct(ConfigFactoryInterface $config_factory, TypedConfigManagerInterface $typed_config_manager, AliasManagerInterface $alias_manager, PathValidatorInterface $path_validator, RequestContext $request_context, AccountInterface $user, SiteConfiguration $service) { + parent::__construct($config_factory, $typed_config_manager); $this->aliasManager = $alias_manager; $this->pathValidator = $path_validator; $this->requestContext = $request_context; @@ -88,6 +89,7 @@ public function __construct(ConfigFactoryInterface $config_factory, AliasManager public static function create(ContainerInterface $container) { return new static( $container->get('config.factory'), + $container->get('config.typed'), $container->get('path_alias.manager'), $container->get('path.validator'), $container->get('router.request_context'), diff --git a/src/SiteConfiguration.php b/src/SiteConfiguration.php index 2ac1ff2..5c2edd2 100644 --- a/src/SiteConfiguration.php +++ b/src/SiteConfiguration.php @@ -473,7 +473,7 @@ public function attachPeopleListConfiguration(array &$variables) { * A node to match includes that are for specific content. If null, only * sitewide includes will be attached. */ - public function attachExternalServiceIncludes(array &$attachments, NodeInterface $node = NULL) { + public function attachExternalServiceIncludes(array &$attachments, ?NodeInterface $node = NULL) { $storage = $this->entityTypeManager->getStorage($this->entityTypeRepository->getEntityTypeFromClass(ExternalServiceInclude::class)); $query = $storage->getQuery('OR')->condition('sitewide', TRUE); if ($node) {