public function MediaGalleryImportForm::buildForm in Media Gallery 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
- modules/
media_gallery_import/ src/ Form/ MediaGalleryImportForm.php, line 65
Class
- MediaGalleryImportForm
- Defines a Media Gallery Import Form.
Namespace
Drupal\media_gallery_import\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
$form = [];
$form['fieldset'] = [
'#type' => 'fieldset',
'#title' => $this
->t('Import media galleries'),
'#description' => $this
->t('Galleries will be imported from sites/default/files/media_gallery_export'),
];
$form['fieldset']['submit'] = [
'#value' => $this
->t('Import'),
'#type' => 'submit',
];
return $form;
}