return 1;
} } $loader =
new ClassLoader();
$loader->
addPsr4("Drupal\\
$source_theme_name\\", "
$source/src"
);
$loader->
register();
$generator_classname = "Drupal\\
$source_theme_name\\StarterKit";
if (class_exists($generator_classname)) { if (is_a($generator_classname, StarterKitInterface::
class, TRUE
)) { $generator_classname::
postProcess($tmp_dir,
$destination_theme,
$info['name'
]);
} else { $io->
getErrorStyle()->
error("The
$generator_classname does not implement \Drupal\Core\Theme\StarterKitInterface and cannot perform post-processing."
);
return 1;
} } if (!@
rename($tmp_dir,
$destination)) { // If rename fails, copy the files to the destination directory. This is
// expected to happen when the tmp directory is on a different file
// system.