Problem/Motivation
The ConfigSimpleExampleSettingsForm class uses the following code.
/**
* Constructs a new \Drupal\config_simple_example\Form\ConfigSimpleExampleSettingsForm instance.
*
* @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
* The config factory.
* @param \Drupal\Core\Config\Schema\TypedConfigInterface $typed_config
* The typed config.
* @param \Drupal\Core\StringTranslation\TranslationInterface $string_translation
* The string translation service.
*/
public function __construct(
ConfigFactoryInterface $config_factory,
TypedConfigInterface $typed_config,
TranslationInterface $string_translation,
) {
parent::__construct($config_factory, $typed_config);
$this->setStringTranslation($string_translation);
}
The second parameter the constructor for the parent class expects is the typed config manager, which implements \Drupal\Core\Config\TypedConfigManagerInterface.
Proposed resolution
Fix the arguments passed to the constructor for the parent class.
Comments
Comment #2
avpadernoComment #3
avpadernoComment #5
avpadernoComment #6
avpadernoComment #8
avpadernoComment #10
avpaderno