protected function UserFlagType::isFlaggableOwnable in Flag 8.4
Determines if the flaggable associated with the flag supports ownership.
Return value
boolean TRUE if the flaggable supports ownership.
Overrides EntityFlagType::isFlaggableOwnable
File
- src/
Plugin/ Flag/ UserFlagType.php, line 124
Class
- UserFlagType
- Provides a flag type for user entities.
Namespace
Drupal\flag\Plugin\FlagCode
protected function isFlaggableOwnable() {
// The User entity doesn't implement EntityOwnerInterface, but technically
// a user 'owns' themselves. Moreover, the 'owner' permissions are about
// whether the uid property of the flaggable matches the current user, which
// applies to User flaggables too.
return TRUE;
}