function GlobalTemplateCollectionManager::getGlobalCollectionForTemplate in Courier 8
Same name and namespace in other branches
- 2.x src/Service/GlobalTemplateCollectionManager.php \Drupal\courier\Service\GlobalTemplateCollectionManager::getGlobalCollectionForTemplate()
Get the global template collection associated with a template.
Parameters
\Drupal\courier\ChannelInterface $template: A template entity.
Return value
\Drupal\courier\Entity\GlobalTemplateCollectionInterface|FALSE A global template collection entity, or FALSE if the template is not associated with a global template collection.
Overrides GlobalTemplateCollectionManagerInterface::getGlobalCollectionForTemplate
2 calls to GlobalTemplateCollectionManager::getGlobalCollectionForTemplate()
- GlobalTemplateCollectionManager::importFromGlobalCollection in src/
Service/ GlobalTemplateCollectionManager.php - Imports active configuration from a global template collection into a template entity at runtime.
- GlobalTemplateCollectionManager::notifyTemplateChanged in src/
Service/ GlobalTemplateCollectionManager.php - Notify the manager that a template entity has been saved.
File
- src/
Service/ GlobalTemplateCollectionManager.php, line 48
Class
- GlobalTemplateCollectionManager
- The global template collection manager.
Namespace
Drupal\courier\ServiceCode
function getGlobalCollectionForTemplate(ChannelInterface $template) {
$template_collection = TemplateCollection::getTemplateCollectionForTemplate($template);
if ($template_collection) {
return $this
->getGlobalCollectionForLocalCollection($template_collection);
}
return FALSE;
}