function RecipeRunner::installConfig

Installs a config for a recipe.

Parameters

\Drupal\Core\Recipe\Recipe $recipe: The recipe to install config for.

array<mixed>|null $context: The batch context if called by a batch.

File

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

Class

RecipeRunner
Applies a recipe.

Namespace

Drupal\Core\Recipe

Code

public static function installConfig(Recipe $recipe, ?array &$context = NULL) : void {
    static::processConfiguration($recipe->config);
    $context['message'] = t('Installed configuration for %recipe recipe.', [
        '%recipe' => $recipe->name,
    ]);
    $context['results']['config'][] = $recipe->name;
}

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