public EntityAutocomplete::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 Textfield::getInfo
File
- core/lib/Drupal/Core/Entity/Element/EntityAutocomplete.php, line 27
Class
- EntityAutocomplete
- Provides an entity autocomplete form element.
Namespace
Drupal\Core\Entity\Element
Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | public function getInfo() { $info = parent::getInfo(); $class = get_class( $this ); // Apply default form element properties. $info [ '#target_type' ] = NULL; $info [ '#selection_handler' ] = 'default' ; $info [ '#selection_settings' ] = array (); $info [ '#tags' ] = FALSE; $info [ '#autocreate' ] = NULL; // This should only be set to FALSE if proper validation by the selection // handler is performed at another level on the extracted form values. $info [ '#validate_reference' ] = TRUE; // IMPORTANT! This should only be set to FALSE if the #default_value // property is processed at another level (e.g. by a Field API widget) and // it's value is properly checked for access. $info [ '#process_default_value' ] = TRUE; $info [ '#element_validate' ] = array ( array ( $class , 'validateEntityAutocomplete' )); array_unshift ( $info [ '#process' ], array ( $class , 'processEntityAutocomplete' )); return $info ; } |
Please login to continue.