1

I am writing this Drupal 8 module. I am setting up some configuration settings here

But when I retrieve it here using $this->config()->get() it is not giving anything. Any idea what am I doing wrong?

1

The problem is in your flood_control.settings.yml.

flood_control:
  user_failed_login_ip_limit: 50
  ...

This way, to get user_failed_login_ip_limit you must use $this->config(flood_control.settings)->get('flood_control.user_failed_login_ip_limit'). Or just remove flood_control: on first line for better use.

0

I was stupid enough to not include the schema for the settings. I have made it working by including schema file like this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.