function SearchEmbeddedFormThemeHooks::preprocessSearchResult

Implements hook_preprocess_HOOK().

Attributes

#[Hook('preprocess_search_result')]

File

core/modules/search/tests/modules/search_embedded_form/src/Hook/SearchEmbeddedFormThemeHooks.php, line 26

Class

SearchEmbeddedFormThemeHooks
Theme hook implementations for search_embedded_form module.

Namespace

Drupal\search_embedded_form\Hook

Code

public function preprocessSearchResult(&$variables) : void {
  $form = $this->formBuilder
    ->getForm('Drupal\\search_embedded_form\\Form\\SearchEmbeddedForm');
  $variables['snippet'] = array_merge($variables['snippet'], $form);
}

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