protected static function WidgetBase::getWidgetStateParents in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Field/WidgetBase.php \Drupal\Core\Field\WidgetBase::getWidgetStateParents()
 
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.
2 calls to WidgetBase::getWidgetStateParents()
- WidgetBase::getWidgetState in core/
lib/ Drupal/ Core/ Field/ WidgetBase.php  - Retrieves processing information about the widget from $form_state.
 - WidgetBase::setWidgetState in core/
lib/ Drupal/ Core/ Field/ WidgetBase.php  - Stores processing information about the widget in $form_state.
 
File
- core/
lib/ Drupal/ Core/ Field/ WidgetBase.php, line 481  - Contains \Drupal\Core\Field\WidgetBase.
 
Class
- WidgetBase
 - Base class for 'Field widget' plugin implementations.
 
Namespace
Drupal\Core\FieldCode
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,
  ));
}