public function ControlElementBase::validateSettingsForm in Geolocation Field 8.2
Same name in this branch
- 8.2 modules/geolocation_google_maps/src/Plugin/geolocation/MapFeature/ControlElementBase.php \Drupal\geolocation_google_maps\Plugin\geolocation\MapFeature\ControlElementBase::validateSettingsForm()
- 8.2 modules/geolocation_yandex/src/Plugin/geolocation/MapFeature/ControlElementBase.php \Drupal\geolocation_yandex\Plugin\geolocation\MapFeature\ControlElementBase::validateSettingsForm()
- 8.2 modules/geolocation_leaflet/src/Plugin/geolocation/MapFeature/ControlElementBase.php \Drupal\geolocation_leaflet\Plugin\geolocation\MapFeature\ControlElementBase::validateSettingsForm()
Same name and namespace in other branches
- 8.3 modules/geolocation_yandex/src/Plugin/geolocation/MapFeature/ControlElementBase.php \Drupal\geolocation_yandex\Plugin\geolocation\MapFeature\ControlElementBase::validateSettingsForm()
Validate Feature Form.
Parameters
array $values: Feature values.
\Drupal\Core\Form\FormStateInterface $form_state: Form State.
array $parents: Element parents.
Overrides MapFeatureBase::validateSettingsForm
File
- modules/
geolocation_yandex/ src/ Plugin/ geolocation/ MapFeature/ ControlElementBase.php, line 48
Class
- ControlElementBase
- Class ControlMapFeatureBase.
Namespace
Drupal\geolocation_yandex\Plugin\geolocation\MapFeatureCode
public function validateSettingsForm(array $values, FormStateInterface $form_state, array $parents) {
if (!in_array($values['position'], array_keys(Yandex::getControlPositions()))) {
$form_state
->setErrorByName(implode('][', $parents), $this
->t('No valid position.'));
}
}