Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / search / src / Controller / SearchController.php
index ac078e18eb5393ffa78c0b46cb798fc40343e879..e0b6466aa1997ed43c5a9aa0b3cd7137659e0433 100644 (file)
@@ -5,6 +5,7 @@ namespace Drupal\search\Controller;
 use Drupal\Core\Cache\CacheableDependencyInterface;
 use Drupal\Core\Controller\ControllerBase;
 use Drupal\Core\Render\RendererInterface;
+use Drupal\search\Form\SearchPageForm;
 use Drupal\search\SearchPageInterface;
 use Drupal\search\SearchPageRepositoryInterface;
 use Symfony\Component\DependencyInjection\ContainerInterface;
@@ -84,7 +85,7 @@ class SearchController extends ControllerBase {
     }
 
     $build['#title'] = $plugin->suggestedTitle();
-    $build['search_form'] = $this->entityFormBuilder()->getForm($entity, 'search');
+    $build['search_form'] = $this->formBuilder()->getForm(SearchPageForm::class, $entity);
 
     // Build search results, if keywords or other search parameters are in the
     // GET parameters. Note that we need to try the search if 'keys' is in
@@ -148,8 +149,6 @@ class SearchController extends ControllerBase {
   /**
    * Creates a render array for the search help page.
    *
-   * @param \Symfony\Component\HttpFoundation\Request $request
-   *   The request object.
    * @param \Drupal\search\SearchPageInterface $entity
    *   The search page entity.
    *