Skip to content
Snippets Groups Projects

Issue #3508548: Fix for ConfigFormBase::__construct() error

Open Priti Kelaskar requested to merge issue/anu_lms-3508548:3508548-too-few-arguments into 2.x
1 file
+ 6
2
Compare changes
  • Side-by-side
  • Inline
+ 6
2
@@ -4,6 +4,7 @@ namespace Drupal\anu_lms\Form;
use Drupal\anu_lms\Settings;
use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\Config\TypedConfigManagerInterface;
use Drupal\Core\Form\ConfigFormBase;
use Drupal\Core\Form\FormStateInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
@@ -25,11 +26,13 @@ class LabelsForm extends ConfigFormBase {
*
* @param \Drupal\Core\Config\ConfigFactoryInterface $configFactory
* The factory for configuration objects.
* @param \Drupal\Core\Config\TypedConfigManagerInterface $typedConfigManager
* The typed config manager.
* @param \Drupal\anu_lms\Settings $settings
* The Settings instance.
*/
public function __construct(ConfigFactoryInterface $configFactory, Settings $settings) {
parent::__construct($configFactory);
public function __construct(ConfigFactoryInterface $configFactory, TypedConfigManagerInterface $typedConfigManager, Settings $settings) {
parent::__construct($configFactory, $typedConfigManager);
$this->settings = $settings;
}
@@ -39,6 +42,7 @@ class LabelsForm extends ConfigFormBase {
public static function create(ContainerInterface $container) {
return new static(
$container->get('config.factory'),
$container->get('config.typed'),
$container->get('anu_lms.settings'),
);
}
Loading