function InstallCommand::validateRecipe
Validates a user provided recipe.
Parameters
string $recipe: The path to the recipe to validate.
Return value
bool TRUE if the recipe exists, FALSE if not.
1 call to InstallCommand::validateRecipe()
- InstallCommand::execute in core/
lib/ Drupal/ Core/ Command/ InstallCommand.php - Executes the current command.
File
-
core/
lib/ Drupal/ Core/ Command/ InstallCommand.php, line 336
Class
- InstallCommand
- Installs a Drupal site for local testing/development.
Namespace
Drupal\Core\CommandCode
protected function validateRecipe(string $recipe) : bool {
// It is impossible to validate a recipe fully at this point because that
// requires a container.
if (!is_dir($recipe) || !is_file($recipe . '/recipe.yml')) {
return FALSE;
}
return TRUE;
}