function Drupal::configFactory

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

7 calls to Drupal::configFactory()
BlockCreationTrait::placeBlock in core/modules/block/tests/src/Traits/BlockCreationTrait.php
Creates a block instance based on default settings.
block_post_update_replace_node_type_condition in core/modules/block/block.post_update.php
Updates the node type visibility condition.
PhpMail::__construct in core/lib/Drupal/Core/Mail/Plugin/Mail/PhpMail.php
PhpMail constructor.
ProcessedText::configFactory in core/modules/filter/src/Element/ProcessedText.php
Wraps the config factory.
system_post_update_sort_all_config in core/modules/system/system.post_update.php
Sort all configuration according to its schema.

... See full list

File

core/lib/Drupal.php, line 434

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.