You are here

function _courier_entity_postsave in Courier 8

Same name and namespace in other branches
  1. 2.x courier.module \_courier_entity_postsave()

Respond to saving entities after they have been written to storage.

2 calls to _courier_entity_postsave()
courier_entity_insert in ./courier.module
Implements hook_entity_insert().
courier_entity_update in ./courier.module
Implements hook_entity_update().

File

./courier.module, line 29

Code

function _courier_entity_postsave(EntityInterface $entity) {
  if ($entity instanceof ChannelInterface) {

    /** @var \Drupal\courier\Service\GlobalTemplateCollectionManagerInterface $template_collection_manager */
    $template_collection_manager = \Drupal::service('courier.manager.global_template_collection');
    $template_collection_manager
      ->notifyTemplateChanged($entity);
  }
}