You are here

class OpenlayersMapAddForm in Openlayers 8.4

Class OpenlayersMapAddForm.

Provides the add form for our Openlayers Map entity.

Hierarchy

  • class \Drupal\openlayers\Form\OpenlayersMapAddForm extends \Drupal\openlayers\Form\OpenlayersMapFormBase

Expanded class hierarchy of OpenlayersMapAddForm

File

src/Form/OpenlayersMapAddForm.php, line 12

Namespace

Drupal\openlayers\Form
View source
class OpenlayersMapAddForm extends OpenlayersMapFormBase {

  /**
   * Returns the actions provided by this form.
   *
   * For our add form, we only need to change the text of the submit button.
   *
   * @param array $form
   *   An associative array containing the structure of the form.
   * @param \Drupal\Core\Form\FormStateInterface $form_state
   *   An associative array containing the current state of the form.
   *
   * @return array
   *   An array of supported actions for the current entity form.
   */
  protected function actions(array $form, FormStateInterface $form_state) {
    $actions = parent::actions($form, $form_state);
    $actions['submit']['#value'] = $this
      ->t('Create Map');
    return $actions;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
OpenlayersMapAddForm::actions protected function Returns the actions provided by this form.