public function ConfigFactory::leaveContext

Leaves the current context by removing it from the context stack.

Return value

\Drupal\Core\Config\ConfigFactory The config factory object.

File

drupal/core/lib/Drupal/Core/Config/ConfigFactory.php, line 170
Definition of Drupal\Core\Config\ConfigFactory.

Class

ConfigFactory
Defines the configuration object factory.

Namespace

Drupal\Core\Config

Code

public function leaveContext() {

  // Ensure at least one context is left on the stack. We already ensured
  // there is at least one context set by taking the initial one in the
  // constructor.
  if (count($this->contextStack) > 1) {
    array_pop($this->contextStack);
  }
  return $this;
}