code: public function get($form, $options = null, $params = null)
      {
          if (!is_object($form)) {
              $form             = $this->formElementManager->get($form, $options);
          }
  
          /** @noinspection PhpUndefinedMethodInspection */
          $params           = $params ?: clone $this->getController()->getRequest()->getQuery();
  
          /* I tried using form methods (bind, isValid)...
           * but because the search form could be in an invalidated state
           * when the page is loaded, we need to hydrate the params manually.
           */
          $hydrator = $form->getHydrator();
          $data     = $hydrator->extract($params);
          $form->setData($data);
  
          $hydrator->hydrate($data, $params);
  
          return $form;
      }
docs: Fetches a text search form.
  
  If only the service for an element fieldset ist passed,
  it will fetch a "Core/TextSearch" form and pass the
  elements fieldset along.
  
  @param string|Form     $form
  @param array|null $options
  @param Parameters $params
  
  @return \Core\Form\SearchForm