protected function FormBase::configFactory in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Form/FormBase.php \Drupal\Core\Form\FormBase::configFactory()
- 9 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
5 calls to FormBase::configFactory()
- ConfigTranslationFormBase::buildForm in core/
modules/ config_translation/ src/ Form/ ConfigTranslationFormBase.php - Implements \Drupal\Core\Form\FormInterface::buildForm().
- ConfigTranslationFormBase::submitForm in core/
modules/ config_translation/ src/ Form/ ConfigTranslationFormBase.php - Form submission handler.
- EntityDisplayFormBase::getDisplays in core/
modules/ field_ui/ src/ Form/ EntityDisplayFormBase.php - Returns entity (form) displays for the current entity display type.
- FormBase::config in core/
lib/ Drupal/ Core/ Form/ FormBase.php - Retrieves a configuration object.
- ThemeExperimentalConfirmForm::submitForm in core/
modules/ system/ src/ Form/ ThemeExperimentalConfirmForm.php - Form submission handler.
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;
}