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::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::handlesMultipleValues

protected WidgetBase::handlesMultipleValues() Returns whether the widget handles multiple values. Return value bool TRUE if a single copy of formElement() can handle multiple field values, FALSE if multiple values require separate copies of formElement(). File core/lib/Drupal/Core/Field/WidgetBase.php, line 539 Class WidgetBase Base class for 'Field widget' plugin implementations. Namespace Drupal\Core\Field Code protected function handlesMultipleValues() { $definition = $this->g

WidgetBase::isApplicable

public static WidgetBase::isApplicable(FieldDefinitionInterface $field_definition) Returns if the widget can be used for the provided field. Parameters \Drupal\Core\Field\FieldDefinitionInterface $field_definition: The field definition that should be checked. Return value bool TRUE if the widget can be used, FALSE otherwise. Overrides WidgetInterface::isApplicable File core/lib/Drupal/Core/Field/WidgetBase.php, line 547 Class WidgetBase Base class for 'Field widget' plugin implementation

WidgetBase::isDefaultValueWidget

protected WidgetBase::isDefaultValueWidget(FormStateInterface $form_state) Returns whether the widget used for default value form. Parameters \Drupal\Core\Form\FormStateInterface $form_state: The current state of the form. Return value bool TRUE if a widget used to input default value, FALSE otherwise. File core/lib/Drupal/Core/Field/WidgetBase.php, line 561 Class WidgetBase Base class for 'Field widget' plugin implementations. Namespace Drupal\Core\Field Code protected function isDe

WidgetBase::massageFormValues

public WidgetBase::massageFormValues(array $values, array $form, FormStateInterface $form_state) Massages the form values into the format expected for field values. Parameters array $values: The submitted form values produced by the widget. If the widget does not manage multiple values itself, the array holds the values generated by the multiple copies of the $element generated by the formElement() method, keyed by delta. If the widget manages multiple values, the array holds the values of the

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::settingsSummary

public WidgetBase::settingsSummary() Returns a short summary for the current widget settings. If an empty result is returned, a UI can still be provided to display a settings form in case the widget has configurable settings. Return value array A short summary of the widget settings. Overrides WidgetInterface::settingsSummary File core/lib/Drupal/Core/Field/WidgetBase.php, line 491 Class WidgetBase Base class for 'Field widget' plugin implementations. Namespace Drupal\Core\Field Code

WidgetBase::setWidgetState

public static WidgetBase::setWidgetState(array $parents, $field_name, FormStateInterface $form_state, array $field_state) Stores processing information about the widget in $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 widget lives in the form. string $field_name: The field name. \Drupal\Core\Form\FormStateInterface $form_state: The form state. array $field_state: The array of data to store. Se

WidgetBase::__construct

public WidgetBase::__construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, array $third_party_settings) Constructs a WidgetBase object. Parameters array $plugin_id: The plugin_id for the widget. mixed $plugin_definition: The plugin implementation definition. \Drupal\Core\Field\FieldDefinitionInterface $field_definition: The definition of the field to which the widget is associated. array $settings: The widget settings. array $third_party_setting