public function ModuleMissingMessageFixerForm::buildForm in Module Missing Message Fixer 8
Same name and namespace in other branches
- 2.0.x src/Form/ModuleMissingMessageFixerForm.php \Drupal\module_missing_message_fixer\Form\ModuleMissingMessageFixerForm::buildForm()
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/ ModuleMissingMessageFixerForm.php, line 89
Class
- ModuleMissingMessageFixerForm
- Class ModuleMissingMessageFixerForm.
Namespace
Drupal\module_missing_message_fixer\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
// Fancy title string.
$title = $this
->t('This list comes from the system table and is checked against the drupal_get_filename() function. See <a href="@link" target="_blank">this issue</a> for more information.', [
'@link' => 'https://www.drupal.org/node/2487215',
]);
// Title.
$form['title'] = [
'#type' => 'item',
'#markup' => '<h4>' . $title . '</h4>',
];
// Fancy submit buttons to win this.
$form['submit'] = [
'#type' => 'submit',
'#value' => $this
->t('Remove These Errors!'),
];
// Set the tables select to make this more granular.
$form['table'] = [
'#type' => 'tableselect',
'#header' => $this->mmmf
->getTableHeader(),
'#options' => $this->mmmf
->getTableRows(),
'#empty' => $this
->t('No Missing Modules Found!!!'),
];
return $form;
}