You are here

public function PhotosImageSearch::execute in Album Photos 6.0.x

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

Executes the search.

Return value

array A structured list of search results.

Overrides SearchInterface::execute

File

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

Class

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

Namespace

Drupal\photos\Plugin\Search

Code

public function execute() {
  if ($this
    ->isSearchExecutable()) {
    $results = $this
      ->findResults();
    if ($results) {
      return $this
        ->prepareResults($results);
    }
  }
  return [];
}