By jrockowitz on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.x-5.x
Introduced in version:
8.x-5.0-rc5
Issue links:
Description:
In hook_webform_element_alter() the $context['webform'] parameter has been changed to $context['form'] to properly represent the parameter's data type which is a Form API render array.
The below API document (@see webform.api.php) has been changed from...
/**
* Alter webform elements.
*
* @param array $element
* The webform element.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The current state of the form.
* @param array $context
* An associative array containing the following key-value pairs:
* - webform: The webform structure to which elements is being attached.
*/
function hook_webform_element_alter(array &$element, \Drupal\Core\Form\FormStateInterface $form_state, array $context) {
....
}
...to...
/**
* Alter webform elements.
*
* @param array $element
* The webform element.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The current state of the form.
* @param array $context
* An associative array containing the following key-value pairs:
* - form: The form structure to which elements is being attached.
*/
function hook_webform_element_alter(array &$element, \Drupal\Core\Form\FormStateInterface $form_state, array $context) {
...
}
Impacts:
Module developers