83 return $this->
repository->findById($templateId);
92 return $this->
repository->findByContextId($contextId);
133 foreach ($allOfContext as $otherTemplate) {
134 $otherTemplate->setAsDefault(
false);
136 if ((
int) $template->
getTplId() === (int) $otherTemplate->getTplId()) {
137 $otherTemplate->setAsDefault(
true);
unsetAsContextDefault(\ilMailTemplate $template)
modifyExistingTemplate(int $templateId, string $contextId, string $title, string $subject, string $message, string $language)
loadTemplatesForContextId(string $contextId)
Class ilMailTemplateService.
setAsDefault(bool $isDefault)
__construct(\ilMailTemplateRepository $repository)
ilMailTemplateService constructor.
createNewTemplate(string $contextId, string $title, string $subject, string $message, string $language)
catch(Exception $e) $message
loadTemplateForId(int $templateId)
setAsContextDefault(\ilMailTemplate $template)
Class ilMailTemplateRepository.
listAllTemplatesAsArray()
deleteTemplatesByIds(array $templateIds)