You are here

public function OgMembership::isOwner in Organic groups 8

Returns TRUE if the OG membership belongs to the group owner.

Return value

bool TRUE if the OG membership belongs to the group owner, FALSE otherwise.

Overrides OgMembershipInterface::isOwner

File

src/Entity/OgMembership.php, line 584

Class

OgMembership
The membership entity that connects a group and a user.

Namespace

Drupal\og\Entity

Code

public function isOwner() : bool {
  $group = $this
    ->getGroup();
  return $group instanceof EntityOwnerInterface && $group
    ->getOwnerId() == $this
    ->getOwnerId();
}