You are here

public function Flagging::postSave in Flag 8.4

{@inheritdoc

Overrides ContentEntityBase::postSave

File

src/Entity/Flagging.php, line 186

Class

Flagging
Provides the flagging content entity.

Namespace

Drupal\flag\Entity

Code

public function postSave(EntityStorageInterface $storage, $update = TRUE) {
  parent::postSave($storage, $update);
  if (!$update) {
    \Drupal::service('event_dispatcher')
      ->dispatch(FlagEvents::ENTITY_FLAGGED, new FlaggingEvent($this));
  }
}