Same name and namespace in other branches
- 8.9.x core/lib/Drupal.php \Drupal::configFactory()
- 9 core/lib/Drupal.php \Drupal::configFactory()
Retrieves the configuration factory.
This is mostly used to change the override settings on the configuration factory. For example, changing the language, or turning all overrides on or off.
Return value
\Drupal\Core\Config\ConfigFactoryInterface The configuration factory service.
127 calls to Drupal::configFactory()
- AjaxTest::testAjaxWithAdminRoute in core/
tests/ Drupal/ FunctionalJavascriptTests/ Ajax/ AjaxTest.php - AjaxTest::testUiAjaxException in core/
tests/ Drupal/ FunctionalJavascriptTests/ Ajax/ AjaxTest.php - Tests that Ajax errors are visible in the UI.
- automated_cron_settings_submit in core/
modules/ automated_cron/ automated_cron.module - Form submission handler for system_cron_settings().
- BlockCreationTrait::placeBlock in core/
modules/ block/ tests/ src/ Traits/ BlockCreationTrait.php - Creates a block instance based on default settings.
- BlockInvalidRegionTest::testBlockInInvalidRegion in core/
modules/ block/ tests/ src/ Functional/ BlockInvalidRegionTest.php - Tests that blocks assigned to invalid regions work correctly.
File
- core/
lib/ Drupal.php, line 427
Class
- Drupal
- Static Service Container wrapper.
Code
public static function configFactory() {
return static::getContainer()
->get('config.factory');
}