function _courier_entity_postsave in Courier 2.x
Same name and namespace in other branches
- 8 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 34 - Hooks for Courier.
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);
}
}