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.

Issue fork examples-3588196

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

avpaderno created an issue. See original summary.

avpaderno’s picture

Title: The wrong value is passed as second parameter to ConfigFormBase constructor » The wrong value is passed as second parameter to the ConfigFormBase constructor
avpaderno’s picture

Assigned: Unassigned » avpaderno

avpaderno’s picture

Status: Active » Needs review
avpaderno’s picture

Status: Needs review » Reviewed & tested by the community

  • avpaderno committed 056c2bc5 on 5.0.x
    Issue #3588196: The wrong value is passed as second parameter to the...
avpaderno’s picture

Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

avpaderno’s picture

Assigned: avpaderno » Unassigned

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.