You are here

function skinr_context_entity_delete in Skinr 8.2

Implements hook_entity_delete().

File

skinr_context/skinr_context.module, line 628
Provides Skinr integration with Context.

Code

function skinr_context_entity_delete(Drupal\Core\Entity\EntityInterface $entity) {
  if ($entity
    ->getEntityTypeId() !== 'skin') {
    return;
  }
  if (!empty($entity->gid)) {
    db_delete('skinr_group_skins')
      ->condition('sid', $entity->sid)
      ->execute();
  }
}