function install_recipe_batch
Same name in other branches
- 10 core/includes/install.core.inc \install_recipe_batch()
Creates a batch for the recipe system to process.
@internal This API is experimental.
See also
File
-
core/
includes/ install.core.inc, line 2622
Code
function install_recipe_batch(&$install_state) {
$batch_builder = new BatchBuilder();
$batch_builder->setTitle(t('Installing recipe'))
->setInitMessage(t('Starting recipe installation.'))
->setErrorMessage(t('Recipe installation has encountered an error.'));
$recipe = Recipe::createFromDirectory($install_state['parameters']['recipe']);
foreach (RecipeRunner::toBatchOperations($recipe) as $step) {
$batch_builder->addOperation(...$step);
}
return $batch_builder->toArray();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.