Same name and namespace in other branches
  1. 8.9.x core/lib/Drupal.php \Drupal::configFactory()
  2. 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.

139 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.
BlockFilterTest::setUp in core/modules/layout_builder/tests/src/FunctionalJavascript/BlockFilterTest.php

... See full list

File

core/lib/Drupal.php, line 427

Class

Drupal
Static Service Container wrapper.

Code

public static function configFactory() {
  return static::getContainer()
    ->get('config.factory');
}