Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
$this->setConfigFactory is already done from the parent class. so not requited to set again in the constructor.
Comment | File | Size | Author |
---|---|---|---|
#2 | configfactory-fixes-3224623-2.patch | 1.38 KB | vipin.mittal18 |
Comments
Comment #2
vipin.mittal18Kindly apply the attached patch. I have also tested the form after verification.
Comment #3
jcnventura CreditAttribution: jcnventura at 1xINTERNET commentedSorry, but your code can't possibly be right. We could indeed skip the create() and constructor methods, if we weren't also injecting the module.handler service. The code as you proposed would never initialize the parent class configFactory attribute, since the parent constructor would never be called.
The code as we have now is correct, but it could indeed be slightly improved if we called the parent constructor instead of duplicating it's functionality in the constructor of the child class.
Comment #5
jcnventura CreditAttribution: jcnventura at 1xINTERNET commented