You are here

public function BrightcoveVideoSearch::execute in Brightcove Video Connect 8.2

Same name and namespace in other branches
  1. 3.x src/Plugin/Search/BrightcoveVideoSearch.php \Drupal\brightcove\Plugin\Search\BrightcoveVideoSearch::execute()

Executes the search.

Return value

array A structured list of search results.

Throws

\Drupal\Core\Entity\EntityMalformedException

Overrides SearchInterface::execute

File

src/Plugin/Search/BrightcoveVideoSearch.php, line 114

Class

BrightcoveVideoSearch
Executes a keyword search for videos against the {brightcove_video} table.

Namespace

Drupal\brightcove\Plugin\Search

Code

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