function realistic_dummy_content_api_apply_recipe in Realistic Dummy Content 3.x
Same name and namespace in other branches
- 8.2 api/realistic_dummy_content_api.module \realistic_dummy_content_api_apply_recipe()
- 8 api/realistic_dummy_content_api.module \realistic_dummy_content_api_apply_recipe()
- 7.2 api/realistic_dummy_content_api.module \realistic_dummy_content_api_apply_recipe()
- 7 api/realistic_dummy_content_api.module \realistic_dummy_content_api_apply_recipe()
Attempts to generate all realistic content for the current site.
Parameters
object $log: An object of a class which implements the interface RealisticDummyContentLogInterface. Logging will be different if you are using drush or in the context of an automated test, for example.
2 calls to realistic_dummy_content_api_apply_recipe()
- drush_realistic_dummy_content_api_generate_realistic in api/
realistic_dummy_content_api.drush.inc - Callback: Generates realistic content.
- RealisticDummyContentDrushCommands::generateRealistic in api/
src/ DrushCommands/ RealisticDummyContentDrushCommands.php - Generates realistic dummy content.
File
- api/
realistic_dummy_content_api.module, line 320 - API code allowing other modules to generate realistic dummy content.
Code
function realistic_dummy_content_api_apply_recipe($log) {
try {
RealisticDummyContentRecipe::run($log);
} catch (\Throwable $e) {
$log
->log('An exception occurred while trying to apply a recipe');
$log
->error($e
->getMessage());
}
}