MapStyleEditForm.php in Openlayers 8.4
File
src/Form/MapStyleEditForm.php
View source
<?php
namespace Drupal\openlayers\Form;
use Drupal\Core\Form\FormStateInterface;
use Drupal\openlayers\OpenlayersMapInterface;
use Drupal\openlayers\OpenlayersLayerInterface;
class MapStyleEditForm extends MapLayerFormBase {
public function buildForm(array $form, FormStateInterface $form_state, OpenlayersMapInterface $map = NULL, $layer = NULL) {
$form = parent::buildForm($form, $form_state, $map, $layer);
$form['#title'] = $this
->t('Edit %label layer', [
'%label' => $this->mapLayer
->label(),
]);
$form['actions']['submit']['#value'] = $this
->t('Update layer');
return $form;
}
protected function prepareOpenlayersLayer($layer) {
return $layer;
}
}