abstract class FlagEventBase in Flag 8.4
Base Event from which other flag event are defined.
Hierarchy
- class \Drupal\flag\Event\FlagEventBase extends \Symfony\Component\EventDispatcher\Event
Expanded class hierarchy of FlagEventBase
File
- src/
Event/ FlagEventBase.php, line 12
Namespace
Drupal\flag\EventView source
abstract class FlagEventBase extends Event {
/**
* The Flag in question.
*
* @var \Drupal\flag\FlagInterface
*/
protected $flag;
/**
* Build the flag event class.
*
* @param \Drupal\flag\FlagInterface $flag
* The flag to be acted upon.
*/
public function __construct(FlagInterface $flag) {
$this->flag = $flag;
}
/**
* Get the flag entity related to the event.
*
* @return \Drupal\flag\FlagInterface
* The flag related to the event.
*/
public function getFlag() {
return $this->flag;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
FlagEventBase:: |
protected | property | The Flag in question. | |
FlagEventBase:: |
public | function | Get the flag entity related to the event. | |
FlagEventBase:: |
public | function | Build the flag event class. |