public function NodeImportFile::buildForm in Node export 8
Form constructor.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Return value
array The form structure.
Overrides FormInterface::buildForm
File
- src/
Form/ NodeImportFile.php, line 23
Class
- NodeImportFile
- Provides a Node Import form.
Namespace
Drupal\node_Export\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
$form['myfile'] = [
'#title' => $this
->t('Upload myfile'),
'#type' => 'file',
];
$form['submit'] = [
'#type' => 'submit',
'#value' => 'Import',
];
return $form;
}