You are here

public function PhotosImageSearch::removeSubmittedInfo in Album Photos 8.5

Same name and namespace in other branches
  1. 6.0.x src/Plugin/Search/PhotosImageSearch.php \Drupal\photos\Plugin\Search\PhotosImageSearch::removeSubmittedInfo()

Removes the submitted by information from the build array.

This information is being removed from the rendered node that is used to build the search result snippet. It just doesn't make sense to have it displayed in the snippet.

Parameters

array $build: The build array.

Return value

array The modified build array.

File

src/Plugin/Search/PhotosImageSearch.php, line 435

Class

PhotosImageSearch
Handles searching for photos_image entities using the Search module index.

Namespace

Drupal\photos\Plugin\Search

Code

public function removeSubmittedInfo(array $build) {
  unset($build['created']);
  unset($build['uid']);
  return $build;
}