protected static WidgetBase::getWidgetStateParents(array $parents, $field_name)
Returns the location of processing information within $form_state.
Parameters
array $parents: The array of #parents where the widget lives in the form.
string $field_name: The field name.
Return value
array The location of processing information within $form_state.
File
- core/lib/Drupal/Core/Field/WidgetBase.php, line 474
Class
- WidgetBase
- Base class for 'Field widget' plugin implementations.
Namespace
Drupal\Core\Field
Code
protected static function getWidgetStateParents(array $parents, $field_name) { // Field processing data is placed at // $form_state->get(['field_storage', '#parents', ...$parents..., '#fields', $field_name]), // to avoid clashes between field names and $parents parts. return array_merge(array('field_storage', '#parents'), $parents, array('#fields', $field_name)); }
Please login to continue.