function Drupal::configFactory

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

11 calls to Drupal::configFactory()
BlockCreationTrait::placeBlock in core/modules/block/tests/src/Traits/BlockCreationTrait.php
Creates a block instance based on default settings.
block_content_post_update_block_library_view_permission in core/modules/block_content/block_content.post_update.php
Update block_content 'block library' view permission.
DateRangeFormatterSettingsUpdateTest::testPostUpdateDateRangeFormatter in core/modules/datetime_range/tests/src/Functional/DateRangeFormatterSettingsUpdateTest.php
Tests update path for the 'from_to' formatter setting.
help_post_update_help_topics_search in core/modules/help/help.post_update.php
Install or update config for help topics if the search module installed.
PhpMail::__construct in core/lib/Drupal/Core/Mail/Plugin/Mail/PhpMail.php
PhpMail constructor.

... 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');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.