public function MapLayerAddForm::buildForm in Openlayers 8.4
Parameters
\Drupal\image\ImageStyleInterface $image_style: The image style.
string $image_effect: The image effect ID.
Return value
array The form structure.
Throws
\Symfony\Component\HttpKernel\Exception\NotFoundHttpException
Overrides MapLayerFormBase::buildForm
File
- src/
Form/ MapLayerAddForm.php, line 48
Class
- MapLayerAddForm
- Provides an add form for image effects.
Namespace
Drupal\openlayers\FormCode
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('Add %label layer to map', [
'%label' => $this->mapLayer
->label(),
]);
$form['actions']['submit']['#value'] = $this
->t('Add layer');
return $form;
}