You are here

public function FileSearch::execute in Search File Attachments 8

Executes the search.

Return value

array A structured list of search results.

Overrides SearchInterface::execute

File

src/Plugin/Search/FileSearch.php, line 149

Class

FileSearch
Executes a keyword search for files against {file_managed} database table.

Namespace

Drupal\search_file_attachments\Plugin\Search

Code

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