You are here

protected function SearchApiPageController::finishBuild in Search API Pages 8

Finishes the build.

Parameters

array $build: An array containing all page elements.

\Drupal\search_api_page\SearchApiPageInterface $searchApiPage: The Search API page entity.

\Drupal\search_api\Query\ResultSetInterface $result: Search API result.

Return value

array An array containing all page elements.

3 calls to SearchApiPageController::finishBuild()
SearchApiPageController::finishBuildWithoutResults in src/Controller/SearchApiPageController.php
Adds the no results text and then finishes the build.
SearchApiPageController::finishBuildWithResults in src/Controller/SearchApiPageController.php
Adds the results to the given build and then finishes it.
SearchApiPageController::page in src/Controller/SearchApiPageController.php
Page callback.

File

src/Controller/SearchApiPageController.php, line 214

Class

SearchApiPageController
Defines a controller to serve search pages.

Namespace

Drupal\search_api_page\Controller

Code

protected function finishBuild(array $build, SearchApiPageInterface $searchApiPage, ResultSetInterface $result = NULL) {
  $this
    ->moduleHandler()
    ->alter('search_api_page', $build, $result, $searchApiPage);

  // TODO caching dependencies.
  // @see https://www.drupal.org/project/search_api_page/issues/2754411.
  return $build;
}