function courier_entity_load in Courier 8
Same name and namespace in other branches
- 2.x courier.module \courier_entity_load()
Implements hook_entity_load().
File
- ./
courier.module, line 40
Code
function courier_entity_load($entities, $entity_type) {
if (!reset($entities) instanceof ChannelInterface) {
return;
}
/** @var \Drupal\courier\Service\GlobalTemplateCollectionManagerInterface $template_collection_manager */
$template_collection_manager = \Drupal::service('courier.manager.global_template_collection');
foreach ($entities as $entity) {
$template_collection_manager
->importFromGlobalCollection($entity);
}
}