19 declare(strict_types=1);
31 $this->db = $db ?? $DIC->database();
41 $res = $this->db->query(
'SELECT * FROM mail_man_tpl');
42 while ($row = $this->db->fetchAssoc(
$res)) {
44 $templates[] = $template;
56 $res = $this->db->queryF(
57 'SELECT * FROM mail_man_tpl WHERE tpl_id = %s',
62 if (1 === $this->db->numRows(
$res)) {
63 $row = $this->db->fetchAssoc(
$res);
76 return array_filter($this->
getAll(),
static function (
ilMailTemplate $template) use ($contextId):
bool {
86 if (count($templateIds) > 0) {
87 $this->db->manipulate(
111 $nextId = $this->db->nextId(
'mail_man_tpl');
112 $this->db->insert(
'mail_man_tpl', [
__construct(ilDBInterface $db=null)
store(ilMailTemplate $template)
findByContextId(string $contextId)
deleteByIds(array $templateIds)
setTplId(int $templateId)
findById(int $templateId)
Class ilMailTemplateRepository.