19declare(strict_types=1);
26use Psr\Log\LoggerInterface;
57 if ($temp_dir !==
'' && file_exists($temp_dir) && is_dir($temp_dir)) {
60 $this->log->warning(
"Temporary import directory does not exist: {$temp_dir}");
67 $this->log->warning(
"Import target base directory does not exist: {$session->importBaseDir()}");
75 foreach (array_diff(scandir($path), [
'.',
'..']) as $file) {
76 if (is_dir(
"$path/$file")) {
79 unlink(
"$path/$file");
Immutable JSON-capable import session shared by question pool and test wizards.
Outcome of one import stage.
static completedSuccessfully(ImportSession $session)
Final import stage that cleans up the temporary files and directories after successful import or erro...
removeDirectory(string $path)
process(ImportSession $session)
Process the current stage.
__construct(private readonly LoggerInterface $log)
getLabel()
Get the label of the stage which will be displayed in the workflow UI.
getIdentifier()
Get the unique identifier of the stage.
getDescription()
Get the description of the stage which will be displayed in the workflow UI.
One step of an import wizard.