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
Use dependency injection for $user_settings = \Drupal::config('user.settings');
Proposed resolution
/**
* RegistrationLinkAccessCheck constructor.
*
* @param ConfigFactory $configFactory
* The Config Factory service.
*/
public function __construct(ConfigFactory $configFactory) {
$this->configFactory = $configFactory->get('user.settings');
}
Remaining tasks
Create patchReview/RTBCCommit
User interface changes
- None
API changes
- None
Comment | File | Size | Author |
---|---|---|---|
#2 | 3091039-2.patch | 2.23 KB | i-trokhanenko |
Comments
Comment #2
i-trokhanenkoPlease review!
Comment #3
i-trokhanenkoComment #4
Nikolay Khomich CreditAttribution: Nikolay Khomich commentedThanks! #2 works fine for me
Comment #5
i-trokhanenkoComment #7
i-trokhanenko