title = $generator->getName();
$templates = [];
foreach ($generator->templates as $name => $path) {
$templates[$name] = "$name ($path)";
}
?>
=Html::encode($this->title); ?>
=$generator->getDescription(); ?>
"$id-generator",
'successCssClass' => '',
'fieldConfig' => ['class' => ActiveField::className()],
]); ?>
=$this->renderFile($generator->formView(), [
'generator' => $generator,
'form' => $form,
]); ?>
=$form->field($generator, 'template')->sticky()
->label('Code Template')
->dropDownList($templates)->hint('
Please select which set of the templates should be used to generated the code.
'); ?>
=Html::submitButton('Preview', ['name' => 'preview', 'class' => 'btn btn-primary']); ?>
=Html::submitButton('Generate', ['name' => 'generate', 'class' => 'btn btn-success']); ?>
render('view/results', [
'generator' => $generator,
'results' => $results,
'hasError' => $hasError,
]);
} elseif (isset($files)) {
echo $this->render('view/files', [
'generator' => $generator,
'files' => $files,
'answers' => $answers,
]);
}
?>