You are here

public function HttpConfigRequestForm::integerValue in HTTP Client Manager 8

Same name and namespace in other branches
  1. 8.2 src/Form/HttpConfigRequestForm.php \Drupal\http_client_manager\Form\HttpConfigRequestForm::integerValue()

Value callback: casts provided input to integer.

See also

form

File

src/Form/HttpConfigRequestForm.php, line 160

Class

HttpConfigRequestForm
Class HttpConfigRequestForm.

Namespace

Drupal\http_client_manager\Form

Code

public function integerValue(&$element, $input, FormStateInterface $form_state) {
  if ($input !== FALSE && $input !== NULL) {
    return (int) $input;
  }
  return NULL;
}