public function YamlFormUsers::getInfo in YAML Form 8
Returns the element properties for this element.
Return value
array An array of element properties. See \Drupal\Core\Render\ElementInfoManagerInterface::getInfo() for documentation of the standard properties of all elements, and the return value format.
Overrides EntityAutocomplete::getInfo
File
- src/
Element/ YamlFormUsers.php, line 20
Class
- YamlFormUsers
- Provides a users entity reference form element.
Namespace
Drupal\yamlform\ElementCode
public function getInfo() {
$info = parent::getInfo();
$class = get_class($this);
$info['#target_type'] = 'user';
$info['#selection_settings'] = [
'include_anonymous' => FALSE,
];
$info['#tags'] = TRUE;
$info['#default_value'] = [];
$info['#element_validate'] = [
[
$class,
'validateEntityAutocomplete',
],
[
$class,
'validateYamlFormUsers',
],
];
return $info;
}