public function GlobalTemplateCollectionManager::importFromGlobalCollection in Courier 2.x
Same name and namespace in other branches
- 8 src/Service/GlobalTemplateCollectionManager.php \Drupal\courier\Service\GlobalTemplateCollectionManager::importFromGlobalCollection()
Imports active configuration from a global template collection into a template entity at runtime.
This will override message values from the database.
Parameters
\Drupal\courier\ChannelInterface $template: A template entity.
Overrides GlobalTemplateCollectionManagerInterface::importFromGlobalCollection
File
- src/
Service/ GlobalTemplateCollectionManager.php, line 148
Class
- GlobalTemplateCollectionManager
- The global template collection manager.
Namespace
Drupal\courier\ServiceCode
public function importFromGlobalCollection(ChannelInterface $template) {
$gtc = $this
->getGlobalCollectionForTemplate($template);
if ($gtc) {
$content = $gtc
->getTemplate($template
->getEntityTypeId());
if (isset($content)) {
$template
->importTemplate($content);
}
}
}