You are here

public static function Js::processJsCallback in JS Callback Handler 8.3

Process callback for #js_callback and #js_get properties.

Parameters

array $element: The render array element.

\Drupal\Core\Form\FormStateInterface $form_state: The current FormState object.

array $form: The complete form render array.

Return value

array The modified render array element.

See also

js_element_info_alter

File

src/Js.php, line 677

Class

Js
JS Callback Handler service.

Namespace

Drupal\js

Code

public static function processJsCallback(array $element, FormStateInterface $form_state, &$form) {

  // @todo Add this back somehow?
  //    if (isset($element['#js_callback'])) {
  //      $element['#attached']['library'][] = 'js/form';
  //    }
  return $element;
}