function RecipeRunner::processConfiguration

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Recipe/RecipeRunner.php \Drupal\Core\Recipe\RecipeRunner::processConfiguration()

Creates configuration and applies configuration actions.

Parameters

\Drupal\Core\Recipe\ConfigConfigurator $config: The config configurator from the recipe.

2 calls to RecipeRunner::processConfiguration()
RecipeRunner::installConfig in core/lib/Drupal/Core/Recipe/RecipeRunner.php
Installs a config for a recipe.
RecipeRunner::processRecipe in core/lib/Drupal/Core/Recipe/RecipeRunner.php

File

core/lib/Drupal/Core/Recipe/RecipeRunner.php, line 95

Class

RecipeRunner
Applies a recipe.

Namespace

Drupal\Core\Recipe

Code

protected static function processConfiguration(ConfigConfigurator $config) : void {
  $config_installer = new RecipeConfigInstaller(\Drupal::service('config.factory'), \Drupal::service('config.storage'), \Drupal::service('config.typed'), \Drupal::service('config.manager'), \Drupal::service('event_dispatcher'), NULL, \Drupal::service('extension.path.resolver'));
  // Create configuration that is either supplied by the recipe or listed in
  // the config.import section that does not exist.
  $config_installer->installRecipeConfig($config);
  if (!empty($config->config['actions'])) {
    // Process the actions.
    /** @var \Drupal\Core\Config\Action\ConfigActionManager $config_action_manager */
    $config_action_manager = \Drupal::service('plugin.manager.config_action');
    foreach ($config->config['actions'] as $config_name => $actions) {
      foreach ($actions as $action_id => $data) {
        $config_action_manager->applyAction($action_id, $config_name, $data);
      }
    }
  }
}

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