public static function SmartIpAdminSettingsForm::manualLookupAjax in Smart IP 8.2
Same name and namespace in other branches
- 8.4 src/Form/SmartIpAdminSettingsForm.php \Drupal\smart_ip\Form\SmartIpAdminSettingsForm::manualLookupAjax()
- 8.3 src/Form/SmartIpAdminSettingsForm.php \Drupal\smart_ip\Form\SmartIpAdminSettingsForm::manualLookupAjax()
Submit handler to lookup an IP address in the database.
Parameters
array $form:
\Drupal\Core\Form\FormStateInterface $form_state:
Return value
\Drupal\Core\Ajax\AjaxResponse
See also
\Drupal\smart_ip\Form\SmartIpAdminSettingsForm::manualLookup
File
- src/
Form/ SmartIpAdminSettingsForm.php, line 276 - Contains \Drupal\smart_ip\Form\SmartIpAdminSettingsForm.
Class
- SmartIpAdminSettingsForm
- Smart IP main admin settings page.
Namespace
Drupal\smart_ip\FormCode
public static function manualLookupAjax(array $form, FormStateInterface $form_state) {
$response = new AjaxResponse();
$storage = $form_state
->getStorage();
$value = isset($storage['smart_ip_message']) ? $storage['smart_ip_message'] : '';
$response
->addCommand(new HtmlCommand('#smart-ip-location-manual-lookup', $value));
return $response;
}