public function CurrencyAmount::getInfo in Currency 8.3
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 ElementInterface::getInfo
File
- src/
Element/ CurrencyAmount.php, line 81
Class
- CurrencyAmount
- Provides an element to collect amounts of money and convert them to strings.
Namespace
Drupal\currency\ElementCode
public function getInfo() {
$plugin_id = $this
->getPluginId();
return [
'#default_value' => [
'amount' => NULL,
'currency_code' => NULL,
],
'#element_validate' => [
[
get_class($this),
'instantiate#elementValidate#' . $plugin_id,
],
],
// The ISO 4217 codes of the currencies the amount must be in. Use an empty
// array to allow any currency.
'#limit_currency_codes' => [],
// The minimum amount as a numeric string, or FALSE to omit.
'#minimum_amount' => FALSE,
// The maximum amount as a numeric string, or FALSE to omit.
'#maximum_amount' => FALSE,
'#process' => [
[
get_class($this),
'instantiate#process#' . $plugin_id,
],
],
];
}