You are here

public function FlagSearchApiSubscriber::flagEntityFlagged in Flag Search API 8

Method is called whenever the flag.entity_flagged event is dispatched.

Parameters

\Drupal\flag\Event\FlaggingEvent $event: Event.

File

src/EventSubscriber/FlagSearchApiSubscriber.php, line 48

Class

FlagSearchApiSubscriber
Class FlagSearchApiSubscriber.

Namespace

Drupal\flag_search_api\EventSubscriber

Code

public function flagEntityFlagged(FlaggingEvent $event) {
  $this->flagSearchApiReindex
    ->reindexItem($event
    ->getFlagging());
}