You are here

function social_album_node_insert in Open Social 10.1.x

Same name and namespace in other branches
  1. 10.3.x modules/social_features/social_album/social_album.module \social_album_node_insert()
  2. 10.0.x modules/social_features/social_album/social_album.module \social_album_node_insert()
  3. 10.2.x modules/social_features/social_album/social_album.module \social_album_node_insert()

Implements hook_ENTITY_TYPE_insert().

File

modules/social_features/social_album/social_album.module, line 206
The Social Album module.

Code

function social_album_node_insert(EntityInterface $entity) {

  /** @var \Drupal\node\NodeInterface $entity */
  if ($entity
    ->bundle() === 'album') {
    \Drupal::service('cache_tags.invalidator')
      ->invalidateTags([
      'user:' . $entity
        ->getOwnerId(),
    ]);
  }
}