public static function GeocodeFormatterBase::validatePluginsSettingsForm in Geocoder 8.2
File
- modules/
geocoder_field/ src/ Plugin/ Field/ GeocodeFormatterBase.php, line 261
Class
- GeocodeFormatterBase
- Base Plugin implementation of the Geocode formatter.
Namespace
Drupal\geocoder_field\Plugin\FieldCode
public static function validatePluginsSettingsForm(array $element, FormStateInterface &$form_state) {
$plugins = array_filter($element['#value'], function ($value) {
return isset($value['checked']) && TRUE == $value['checked'];
});
if (empty($plugins)) {
$form_state
->setError($element, t('The selected Geocode operation needs at least one plugin.'));
}
}