You are here

public function OgMembership::delete in Organic groups 7.2

Same name and namespace in other branches
  1. 7 og.module \OgMembership::delete()

Permanently deletes the entity.

Overrides Entity::delete

See also

entity_delete()

File

includes/og.membership.inc, line 88
Main class for OG membership entities provided by Entity API.

Class

OgMembership
@file Main class for OG membership entities provided by Entity API.

Code

public function delete() {
  parent::delete();
  og_invalidate_cache();

  // Clear the group content entity field cache.
  cache_clear_all('field:' . $this->entity_type . ':' . $this->etid, 'cache_field');

  // Supporting the entity cache module.
  if (module_exists('entitycache') && db_table_exists('cache_entity_' . $this->entity_type)) {
    cache_clear_all($this->etid, 'cache_entity_' . $this->entity_type);
  }
}