You are here

public function DeleteOgMembership::execute in Organic groups 8

Executes the plugin.

Overrides ExecutableInterface::execute

File

src/Plugin/Action/DeleteOgMembership.php, line 64

Class

DeleteOgMembership
Deletes a group membership.

Namespace

Drupal\og\Plugin\Action

Code

public function execute(?OgMembership $membership = NULL) {
  if (!$membership) {
    return;
  }
  $membership
    ->delete();
}