Same filename and directory in other branches
  1. 8.9.x core/modules/search/src/Form/SearchPageEditForm.php
  2. 9 core/modules/search/src/Form/SearchPageEditForm.php

Namespace

Drupal\search\Form

File

core/modules/search/src/Form/SearchPageEditForm.php
View source
<?php

namespace Drupal\search\Form;

use Drupal\Core\Form\FormStateInterface;

/**
 * Provides a form for editing a search page.
 *
 * @internal
 */
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(),
    ]));
  }

}

Classes

Namesort descending Description
SearchPageEditForm Provides a form for editing a search page.