/**
  * Build the flag reset event.
  *
  * @param \Drupal\flag\FlagInterface $flag
  *  The flag that is being reset.
  * @param int $flagging_count
  *  The number of flaggings that will be deleted.
  */
 public function __construct(FlagInterface $flag, $flagging_count) {
   parent::__construct($flag);
   $this->flagging_count = $flagging_count;
 }
Esempio n. 2
0
  /**
   * Builds a new FlaggingEvent.
   *
   * @param \Drupal\flag\FlagInterface $flag
   *   The flag.
   * @param \Drupal\Core\Entity\EntityInterface $entity
   *   The entity to be acted upon.
   */
  public function __construct(FlagInterface $flag, EntityInterface $entity) {
    parent::__construct($flag);

    $this->entity = $entity;
  }