You are here

class UnflaggingEvent in Flag 8.4

Event for when a flagging is deleted.

Hierarchy

  • class \Drupal\flag\Event\UnflaggingEvent extends \Symfony\Component\EventDispatcher\Event

Expanded class hierarchy of UnflaggingEvent

3 files declare their use of UnflaggingEvent
FlagCountManager.php in src/FlagCountManager.php
FlagEvents.php in tests/modules/flag_event_test/src/EventSubscriber/FlagEvents.php
Flagging.php in src/Entity/Flagging.php

File

src/Event/UnflaggingEvent.php, line 10

Namespace

Drupal\flag\Event
View source
class UnflaggingEvent extends Event {

  /**
   * An array of flaggings.
   *
   * @var \Drupal\flag\FlaggingInterface[]
   */
  protected $flaggings = [];

  /**
   * Builds a new UnflaggingEvent.
   *
   * @param \Drupal\flag\FlaggingInterface[] $flaggings
   *   The flaggings.
   */
  public function __construct(array $flaggings) {
    $this->flaggings = $flaggings;
  }

  /**
   * Returns the flagging associated with the Event.
   *
   * @return \Drupal\flag\FlaggingInterface[]
   *   The flaggings.
   */
  public function getFlaggings() {
    return $this->flaggings;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
UnflaggingEvent::$flaggings protected property An array of flaggings.
UnflaggingEvent::getFlaggings public function Returns the flagging associated with the Event.
UnflaggingEvent::__construct public function Builds a new UnflaggingEvent.