function FormBase::configFactory
Same name in other branches
- 9 core/lib/Drupal/Core/Form/FormBase.php \Drupal\Core\Form\FormBase::configFactory()
- 8.9.x core/lib/Drupal/Core/Form/FormBase.php \Drupal\Core\Form\FormBase::configFactory()
- 10 core/lib/Drupal/Core/Form/FormBase.php \Drupal\Core\Form\FormBase::configFactory()
Gets the config factory for this form.
When accessing configuration values, use $this->config(). Only use this when the config factory needs to be manipulated directly.
Return value
\Drupal\Core\Config\ConfigFactoryInterface
File
-
core/
lib/ Drupal/ Core/ Form/ FormBase.php, line 120
Class
- FormBase
- Provides a base class for forms.
Namespace
Drupal\Core\FormCode
protected function configFactory() {
if (!$this->configFactory) {
$this->configFactory = $this->container()
->get('config.factory');
}
return $this->configFactory;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.