WidgetBase::getWidgetStateParents

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 Drupa

WidgetBase::settingsForm

public WidgetBase::settingsForm(array $form, FormStateInterface $form_state) Returns a form to configure settings for the widget. Invoked from \Drupal\field_ui\Form\EntityDisplayFormBase to allow administrators to configure the widget. The field_ui module takes care of handling submitted form values. Parameters array $form: The form where the settings form is being included in. \Drupal\Core\Form\FormStateInterface $form_state: The current state of the form. Return value array The form definit

WidgetBase::getFieldSetting

protected WidgetBase::getFieldSetting($setting_name) Returns the value of a field setting. Parameters string $setting_name: The setting name. Return value mixed The setting value. File core/lib/Drupal/Core/Field/WidgetBase.php, line 528 Class WidgetBase Base class for 'Field widget' plugin implementations. Namespace Drupal\Core\Field Code protected function getFieldSetting($setting_name) { return $this->fieldDefinition->getSetting($setting_name); }

WidgetBase::formSingleElement

protected WidgetBase::formSingleElement(FieldItemListInterface $items, $delta, array $element, array &$form, FormStateInterface $form_state) Generates the form element for a single copy of the widget. File core/lib/Drupal/Core/Field/WidgetBase.php, line 313 Class WidgetBase Base class for 'Field widget' plugin implementations. Namespace Drupal\Core\Field Code protected function formSingleElement(FieldItemListInterface $items, $delta, array $element, array &$form, FormStateInter

WidgetBase::getWidgetState

public static WidgetBase::getWidgetState(array $parents, $field_name, FormStateInterface $form_state) Retrieves processing information about the widget from $form_state. This method is static so that it can be used in static Form API callbacks. Parameters array $parents: The array of #parents where the field lives in the form. string $field_name: The field name. \Drupal\Core\Form\FormStateInterface $form_state: The form state. Return value array An array with the following key/value pairs: i

WidgetBase::getFilteredDescription

protected WidgetBase::getFilteredDescription() Returns the filtered field description. Return value \Drupal\Core\Field\FieldFilteredMarkup The filtered field description, with tokens replaced. File core/lib/Drupal/Core/Field/WidgetBase.php, line 571 Class WidgetBase Base class for 'Field widget' plugin implementations. Namespace Drupal\Core\Field Code protected function getFilteredDescription() { return FieldFilteredMarkup::create(\Drupal::token()->replace($this->fieldDefiniti

WidgetBase::getFieldSettings

protected WidgetBase::getFieldSettings() Returns the array of field settings. Return value array The array of settings. File core/lib/Drupal/Core/Field/WidgetBase.php, line 515 Class WidgetBase Base class for 'Field widget' plugin implementations. Namespace Drupal\Core\Field Code protected function getFieldSettings() { return $this->fieldDefinition->getSettings(); }

WidgetBase::extractFormValues

public WidgetBase::extractFormValues(FieldItemListInterface $items, array $form, FormStateInterface $form_state) Extracts field values from submitted form values. Parameters \Drupal\Core\Field\FieldItemListInterface $items: The field values. This parameter is altered by reference to receive the incoming form values. array $form: The form structure where field elements are attached to. This might be a full form structure, or a sub-element of a larger form. \Drupal\Core\Form\FormStateInterface $

WidgetBase::flagErrors

public WidgetBase::flagErrors(FieldItemListInterface $items, ConstraintViolationListInterface $violations, array $form, FormStateInterface $form_state) Reports field-level validation errors against actual form elements. Parameters \Drupal\Core\Field\FieldItemListInterface $items: The field values. \Symfony\Component\Validator\ConstraintViolationListInterface $violations: A list of constraint violations to flag. array $form: The form structure where field elements are attached to. This might be

WidgetBase::formMultipleElements

protected WidgetBase::formMultipleElements(FieldItemListInterface $items, array &$form, FormStateInterface $form_state) Special handling to create form elements for multiple values. Handles generic features for multiple fields: number of widgets AHAH-'add more' button table display and drag-n-drop value reordering File core/lib/Drupal/Core/Field/WidgetBase.php, line 142 Class WidgetBase Base class for 'Field widget' plugin implementations. Namespace Drupal\Core\Field Code protec