class SearchPageEditForm

Same name and namespace in other branches
  1. 11.x core/modules/search/src/Form/SearchPageEditForm.php \Drupal\search\Form\SearchPageEditForm

Provides a form for editing a search page.

@internal

Hierarchy

Expanded class hierarchy of SearchPageEditForm

File

core/modules/search/src/Form/SearchPageEditForm.php, line 12

Namespace

Drupal\search\Form
View source
class SearchPageEditForm extends SearchPageFormBase {
  
  /**
   * {@inheritdoc}
   */
  protected function actions(array $form, FormStateInterface $form_state) {
    $actions = parent::actions($form, $form_state);
    $actions['submit']['#value'] = $this->t('Save search page');
    return $actions;
  }
  
  /**
   * {@inheritdoc}
   */
  public function save(array $form, FormStateInterface $form_state) {
    parent::save($form, $form_state);
    $this->messenger()
      ->addStatus($this->t('The %label search page has been updated.', [
      '%label' => $this->entity
        ->label(),
    ]));
  }

}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.