public function RecordshortenClearAll::buildForm in Shorten URLs 8.2
Same name and namespace in other branches
- 8 modules/record_shorten/src/Form/RecordshortenClearAll.php \Drupal\record_shorten\Form\RecordshortenClearAll::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
- modules/
record_shorten/ src/ Form/ RecordshortenClearAll.php, line 23
Class
- RecordshortenClearAll
- Report form.
Namespace
Drupal\record_shorten\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
$form['warning'] = [
'#markup' => '<p><strong>' . t('Warning: there is no confirmation page. Cleared records are permanently deleted.') . '</strong></p>',
];
$form['note'] = [
'#markup' => '<p>' . t('Note: clearing records does not clear the Shorten URLs cache.') . ' ' . t('Also, URLs already in the cache are not recorded again.') . '</p>',
];
$form['clear'] = [
'#type' => 'submit',
'#value' => t('Clear all records'),
];
return $form;
}