public function FastlySettingsForm::uploadVcls in Fastly 8.3
Upload Vcls.
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
\Drupal\Core\Ajax\AjaxResponse AjaxResponse.
File
- src/
Form/ FastlySettingsForm.php, line 374
Class
- FastlySettingsForm
- Class FastlySettingsForm Defines a form to configure module settings.
Namespace
Drupal\fastly\FormCode
public function uploadVcls(array $form, FormStateInterface $form_state) {
$activate = $form_state
->getValue("activate");
$response = new AjaxResponse();
$message = $this->vclHandler
->execute($activate);
$response
->addCommand(new HtmlCommand('.email-valid-message', $message));
return $response;
}