You are here

public function BrightcoveVideoSearch::__construct 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::__construct()

Creates a BrightcoveVideoSearch object.

Parameters

array $configuration: A configuration array containing information about the plugin instance.

string $pluginId: The plugin_id for the plugin instance.

array $definition: The plugin implementation definition.

\Drupal\Core\Session\AccountInterface $currentUser: The current user.

\Drupal\Core\Database\Connection $database: The database connection.

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.

Throws

\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException

\Drupal\Component\Plugin\Exception\PluginNotFoundException

Overrides PluginBase::__construct

File

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

Class

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

Namespace

Drupal\brightcove\Plugin\Search

Code

public function __construct(array $configuration, string $pluginId, array $definition, AccountInterface $currentUser, Connection $database, EntityTypeManagerInterface $entity_type_manager) {
  parent::__construct($configuration, $pluginId, $definition);
  $this->currentUser = $currentUser;
  $this->database = $database;
  $this->brightcoveVideoStorage = $entity_type_manager
    ->getStorage('brightcove_video');
  $this
    ->addCacheTags([
    'brightcove_videos_list',
  ]);
}