You are here

public function EntityAutocomplete::hasMultipleValues in YAML Form 8

Checks if element value has multiple values.

Parameters

array $element: An element.

Return value

bool TRUE if element value has multiple values.

Overrides YamlFormElementBase::hasMultipleValues

2 calls to EntityAutocomplete::hasMultipleValues()
EntityAutocomplete::prepare in src/Plugin/YamlFormElement/EntityAutocomplete.php
Prepare an element to be rendered within a form.
EntityAutocomplete::setDefaultValue in src/Plugin/YamlFormElement/EntityAutocomplete.php
Set an element's default value using saved data.

File

src/Plugin/YamlFormElement/EntityAutocomplete.php, line 58

Class

EntityAutocomplete
Provides a 'entity_autocomplete' element.

Namespace

Drupal\yamlform\Plugin\YamlFormElement

Code

public function hasMultipleValues(array $element) {
  return !empty($element['#tags']) ? TRUE : parent::hasMultipleValues($element);
}