public function GeolocationBlock::addLocationSubmit in Geolocation Field 8.2
Add location.
Parameters
array $form: Current form.
\Drupal\Core\Form\FormStateInterface $form_state: Current form state.
File
- src/
Plugin/ Block/ GeolocationBlock.php, line 223
Class
- GeolocationBlock
- Exposes a map rendered as a block.
Namespace
Drupal\geolocation\Plugin\BlockCode
public function addLocationSubmit(array &$form, FormStateInterface &$form_state) {
$this->configuration['locations'][] = [
'marker_title' => '',
'marker_content' => [
'value' => '',
'format' => filter_default_format(),
],
'marker_coordinates' => [],
];
$form_state
->setRebuild();
}