protected function MultiSelect2BoxesAutocompleteWidget::attachPreload in Select2 Boxes 8
Attach preloaded data.
Parameters
array &$attached: Attached form element.
int $count: Number of entries will be preloaded.
\Drupal\Core\Field\FieldDefinitionInterface $fieldDefinition: The field definition.
Throws
\Drupal\Component\Plugin\Exception\PluginNotFoundException
1 call to MultiSelect2BoxesAutocompleteWidget::attachPreload()
- MultiSelect2BoxesAutocompleteWidget::formElement in src/
Plugin/ Field/ FieldWidget/ MultiSelect2BoxesAutocompleteWidget.php - Returns the form for a single field widget.
File
- src/
Plugin/ Field/ FieldWidget/ MultiSelect2BoxesAutocompleteWidget.php, line 179
Class
- MultiSelect2BoxesAutocompleteWidget
- Plugin implementation of the 'entity_reference autocomplete-tags' widget.
Namespace
Drupal\select2boxes\Plugin\Field\FieldWidgetCode
protected function attachPreload(array &$attached, $count, FieldDefinitionInterface $fieldDefinition) {
$attached['drupalSettings']['preloaded_entries'][$fieldDefinition
->getName()] = $this
->buildPreLoaded($count, $fieldDefinition);
}