You are here

public function FlagEvents::onFlag in Message Subscribe 8

React to entity flagging.

Parameters

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

File

message_subscribe_email/src/EventSubscriber/FlagEvents.php, line 61

Class

FlagEvents
React to flag and unflag events.

Namespace

Drupal\message_subscribe_email\EventSubscriber

Code

public function onFlag(FlaggingEvent $event) {
  $this
    ->triggerEmailFlag($event
    ->getFlagging(), 'flag');
}