Commit 47fbd657 authored by webchick's avatar webchick
Browse files

Issue #1932336 by damiankloip: Use override free configuration context for SystemConfigFormBase.

parent 4ac059e5
......@@ -10,6 +10,7 @@
use Drupal\Core\Form\FormInterface;
use Drupal\Core\ControllerInterface;
use Drupal\Core\Config\ConfigFactory;
use Drupal\Core\Config\Context\ContextInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
......@@ -29,9 +30,12 @@ abstract class SystemConfigFormBase implements FormInterface, ControllerInterfac
*
* @param \Drupal\Core\Config\ConfigFactory $config_factory
* The factory for configuration objects.
* @param \Drupal\Core\Config\Context\ContextInterface $context
* The configuration context to use.
*/
public function __construct(ConfigFactory $config_factory) {
public function __construct(ConfigFactory $config_factory, ContextInterface $context) {
$this->configFactory = $config_factory;
$this->configFactory->enterContext($context);
}
/**
......@@ -39,7 +43,8 @@ public function __construct(ConfigFactory $config_factory) {
*/
public static function create(ContainerInterface $container) {
return new static(
$container->get('config.factory')
$container->get('config.factory'),
$container->get('config.context.free')
);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment