public function ClearUrlForm::buildForm in Akamai 8.3
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/ ClearUrlForm.php, line 51
Class
- ClearUrlForm
- Builds a form to clear urls.
Namespace
Drupal\akamai\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
$current_uri = $this
->getRequest()
->getRequestUri();
$form['path'] = [
'#type' => 'hidden',
'#value' => $current_uri,
];
$form['message'] = [
'#type' => 'item',
'#title' => $this
->t('Refresh URL'),
'#markup' => $current_uri,
];
$form['submit'] = [
'#type' => 'submit',
'#value' => $this
->t('Refresh Akamai Cache'),
];
return $form;
}