public function Number::getInfo in Price 3.0.x
Same name and namespace in other branches
- 8 src/Element/Number.php \Drupal\price\Element\Number::getInfo()
- 3.x src/Element/Number.php \Drupal\price\Element\Number::getInfo()
- 2.0.x src/Element/Number.php \Drupal\price\Element\Number::getInfo()
- 2.x src/Element/Number.php \Drupal\price\Element\Number::getInfo()
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/ Number.php, line 34
Class
- Number
- Provides a number form element with support for language-specific input.
Namespace
Drupal\price\ElementCode
public function getInfo() {
$class = get_class($this);
return [
'#min_fraction_digits' => 0,
'#max_fraction_digits' => 6,
'#min' => 0,
'#max' => NULL,
'#size' => 10,
'#maxlength' => 128,
'#default_value' => NULL,
'#element_validate' => [
[
$class,
'validateNumber',
],
],
'#process' => [
[
$class,
'processElement',
],
[
$class,
'processAjaxForm',
],
[
$class,
'processGroup',
],
],
'#pre_render' => [
[
$class,
'preRenderNumber',
],
[
$class,
'preRenderGroup',
],
],
'#input' => TRUE,
'#theme' => 'input__textfield',
'#theme_wrappers' => [
'form_element',
],
];
}