public function Flagging::getFlag in Flag 8.4
Returns the parent flag entity.
Return value
\Drupal\Core\Entity\EntityInterface|\Drupal\flag\FlagInterface The flag related to this flagging.
Overrides FlaggingInterface::getFlag
File
- src/
Entity/ Flagging.php, line 79
Class
- Flagging
- Provides the flagging content entity.
Namespace
Drupal\flag\EntityCode
public function getFlag() {
return $this
->entityTypeManager()
->getStorage('flag')
->load($this
->getFlagId());
}