You are here

public static function Drupal::configFactory in Drupal 10

Same name and namespace in other branches
  1. 8 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.

118 calls to Drupal::configFactory()
AjaxTest::testAjaxWithAdminRoute in core/tests/Drupal/FunctionalJavascriptTests/Ajax/AjaxTest.php
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.
BlockRebuildTest::testRebuildInvalidBlocks in core/modules/block/tests/src/Kernel/BlockRebuildTest.php
@covers ::block_rebuild

... See full list

File

core/lib/Drupal.php, line 414

Class

Drupal
Static Service Container wrapper.

Code

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