public function KeySelect::getInfo in Key 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 Select::getInfo
File
- src/
Element/ KeySelect.php, line 26
Class
- KeySelect
- Provides a select form element that displays available keys.
Namespace
Drupal\key\ElementCode
public function getInfo() {
$info = parent::getInfo();
$class = get_class($this);
// Add a process function.
array_unshift($info['#process'], [
$class,
'processKeySelect',
]);
// Add a property for key filters.
$info['#key_filters'] = [];
// Add a property for key description.
$info['#key_description'] = TRUE;
return $info;
}