public function WebformLocationGeocomplete::getTestValues in Webform 6.x
Same name and namespace in other branches
- 8.5 modules/webform_location_geocomplete/src/Plugin/WebformElement/WebformLocationGeocomplete.php \Drupal\webform_location_geocomplete\Plugin\WebformElement\WebformLocationGeocomplete::getTestValues()
Get test values for an element.
Parameters
array $element: An element.
\Drupal\webform\WebformInterface $webform: A webform.
array $options: Options used to generate a test value.
Return value
mixed A test value for an element.
Overrides WebformCompositeBase::getTestValues
File
- modules/
webform_location_geocomplete/ src/ Plugin/ WebformElement/ WebformLocationGeocomplete.php, line 158
Class
- WebformLocationGeocomplete
- Provides an 'location' element using Geocomplete.
Namespace
Drupal\webform_location_geocomplete\Plugin\WebformElementCode
public function getTestValues(array $element, WebformInterface $webform, array $options = []) {
return [
[
'value' => 'The White House, 1600 Pennsylvania Ave NW, Washington, DC 20500, USA',
],
[
'value' => 'London SW1A 1AA, United Kingdom',
],
[
'value' => 'Moscow, Russia, 10307',
],
];
}