You are here

class FlaggingEvent in Flag 8.4

Event for when a flagging is created.

Hierarchy

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

Expanded class hierarchy of FlaggingEvent

3 files declare their use of FlaggingEvent
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/FlaggingEvent.php, line 11

Namespace

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

  /**
   * The flagging in question.
   *
   * @var \Drupal\flag\FlaggingInterface
   */
  protected $flagging;

  /**
   * Builds a new FlaggingEvent.
   *
   * @param \Drupal\flag\FlaggingInterface $flagging
   *   The flaging.
   */
  public function __construct(FlaggingInterface $flagging) {
    $this->flagging = $flagging;
  }

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

}

Members

Namesort descending Modifiers Type Description Overrides
FlaggingEvent::$flagging protected property The flagging in question.
FlaggingEvent::getFlagging public function Returns the flagging associated with the Event.
FlaggingEvent::__construct public function Builds a new FlaggingEvent.