ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilMailTemplate Class Reference

Class ilMailTemplate. More...

+ Collaboration diagram for ilMailTemplate:

Public Member Functions

 __construct ($data=null)
 
 getTplId ()
 
 setTplId ($tpl_id)
 
 getTitle ()
 
 setTitle ($title)
 
 getContext ()
 
 setContext ($context)
 
 getLang ()
 
 setLang ($lang)
 
 getSubject ()
 
 setSubject ($m_subject)
 
 getMessage ()
 
 setMessage ($m_message)
 
 insert ()
 
 update ()
 
 delete ($tpl_ids=array())
 

Protected Attributes

 $tpl_id = 0
 
 $title = ''
 
 $context = ''
 
 $lang = ''
 
 $m_subject = ''
 
 $m_message = ''
 
 $db
 

Detailed Description

Class ilMailTemplate.

Author
Nadia Ahmad nahma.nosp@m.d@da.nosp@m.tabay.nosp@m..de

Definition at line 8 of file class.ilMailTemplate.php.

Constructor & Destructor Documentation

◆ __construct()

ilMailTemplate::__construct (   $data = null)
Parameters
array$data

Definition at line 48 of file class.ilMailTemplate.php.

References $data, $DIC, setContext(), setLang(), setMessage(), setSubject(), setTitle(), and setTplId().

49  {
50  global $DIC;
51 
52  $this->db = $DIC->database();
53 
54  if ($data) {
55  $this->setTplId($data['tpl_id']);
56  $this->setTitle($data['title']);
57  $this->setContext($data['context']);
58  $this->setLang($data['lang']);
59  $this->setSubject($data['m_subject']);
60  $this->setMessage($data['m_message']);
61  }
62  }
global $DIC
Definition: saml.php:7
+ Here is the call graph for this function:

Member Function Documentation

◆ delete()

ilMailTemplate::delete (   $tpl_ids = array())
Parameters
array$tpl_ids

Definition at line 193 of file class.ilMailTemplate.php.

194  {
195  }

◆ getContext()

ilMailTemplate::getContext ( )
Returns
string

Definition at line 99 of file class.ilMailTemplate.php.

References $context.

Referenced by ilMailTemplateDataProvider\getTemplateByContextId(), insert(), ilMailTemplateGUI\populateFormWithTemplate(), and update().

100  {
101  return $this->context;
102  }
+ Here is the caller graph for this function:

◆ getLang()

ilMailTemplate::getLang ( )
Returns
string

Definition at line 115 of file class.ilMailTemplate.php.

References $lang.

Referenced by insert(), ilMailTemplateGUI\populateFormWithTemplate(), and update().

116  {
117  return $this->lang;
118  }
+ Here is the caller graph for this function:

◆ getMessage()

ilMailTemplate::getMessage ( )
Returns
string

Definition at line 147 of file class.ilMailTemplate.php.

References $m_message.

Referenced by insert(), ilMailTemplateGUI\populateFormWithTemplate(), and update().

148  {
149  return $this->m_message;
150  }
+ Here is the caller graph for this function:

◆ getSubject()

ilMailTemplate::getSubject ( )
Returns
string

Definition at line 131 of file class.ilMailTemplate.php.

References $m_subject.

Referenced by insert(), ilMailTemplateGUI\populateFormWithTemplate(), and update().

132  {
133  return $this->m_subject;
134  }
+ Here is the caller graph for this function:

◆ getTitle()

ilMailTemplate::getTitle ( )
Returns
string

Definition at line 83 of file class.ilMailTemplate.php.

References $title.

Referenced by insert(), ilMailTemplateGUI\populateFormWithTemplate(), and update().

84  {
85  return $this->title;
86  }
+ Here is the caller graph for this function:

◆ getTplId()

ilMailTemplate::getTplId ( )
Returns
int

Definition at line 67 of file class.ilMailTemplate.php.

References $tpl_id.

Referenced by ilMailTemplateGUI\populateFormWithTemplate(), and update().

68  {
69  return $this->tpl_id;
70  }
+ Here is the caller graph for this function:

◆ insert()

ilMailTemplate::insert ( )

Definition at line 160 of file class.ilMailTemplate.php.

References array, getContext(), getLang(), getMessage(), getSubject(), and getTitle().

161  {
162  $next_id = $this->db->nextId('mail_man_tpl');
163  $this->db->insert('mail_man_tpl', array(
164  'tpl_id' => array('integer', $next_id),
165  'title' => array('text', $this->getTitle()),
166  'context' => array('text', $this->getContext()),
167  'lang' => array('text', $this->getLang()),
168  'm_subject' => array('text', $this->getSubject()),
169  'm_message' => array('text', $this->getMessage())
170  ));
171  }
Create styles array
The data for the language used.
+ Here is the call graph for this function:

◆ setContext()

ilMailTemplate::setContext (   $context)
Parameters
string$context

Definition at line 107 of file class.ilMailTemplate.php.

References $context.

Referenced by __construct().

108  {
109  $this->context = $context;
110  }
+ Here is the caller graph for this function:

◆ setLang()

ilMailTemplate::setLang (   $lang)
Parameters
string$lang

Definition at line 123 of file class.ilMailTemplate.php.

References $lang.

Referenced by __construct().

124  {
125  $this->lang = $lang;
126  }
+ Here is the caller graph for this function:

◆ setMessage()

ilMailTemplate::setMessage (   $m_message)
Parameters
string$m_message

Definition at line 155 of file class.ilMailTemplate.php.

References $m_message.

Referenced by __construct().

156  {
157  $this->m_message = $m_message;
158  }
+ Here is the caller graph for this function:

◆ setSubject()

ilMailTemplate::setSubject (   $m_subject)
Parameters
string$m_subject

Definition at line 139 of file class.ilMailTemplate.php.

References $m_subject.

Referenced by __construct().

140  {
141  $this->m_subject = $m_subject;
142  }
+ Here is the caller graph for this function:

◆ setTitle()

ilMailTemplate::setTitle (   $title)
Parameters
string$title

Definition at line 91 of file class.ilMailTemplate.php.

References $title.

Referenced by __construct().

92  {
93  $this->title = $title;
94  }
+ Here is the caller graph for this function:

◆ setTplId()

ilMailTemplate::setTplId (   $tpl_id)
Parameters
int$tpl_id

Definition at line 75 of file class.ilMailTemplate.php.

References $tpl_id.

Referenced by __construct().

76  {
77  $this->tpl_id = $tpl_id;
78  }
+ Here is the caller graph for this function:

◆ update()

ilMailTemplate::update ( )

Definition at line 173 of file class.ilMailTemplate.php.

References array, getContext(), getLang(), getMessage(), getSubject(), getTitle(), and getTplId().

174  {
175  $this->db->update(
176  'mail_man_tpl',
177  array(
178  'title' => array('text', $this->getTitle()),
179  'context' => array('text', $this->getContext()),
180  'lang' => array('text', $this->getLang()),
181  'm_subject' => array('text', $this->getSubject()),
182  'm_message' => array('text', $this->getMessage())
183  ),
184  array(
185  'tpl_id' => array('integer', $this->getTplId()),
186  )
187  );
188  }
Create styles array
The data for the language used.
+ Here is the call graph for this function:

Field Documentation

◆ $context

ilMailTemplate::$context = ''
protected

Definition at line 23 of file class.ilMailTemplate.php.

Referenced by getContext(), and setContext().

◆ $db

ilMailTemplate::$db
protected

Definition at line 43 of file class.ilMailTemplate.php.

◆ $lang

ilMailTemplate::$lang = ''
protected

Definition at line 28 of file class.ilMailTemplate.php.

Referenced by getLang(), and setLang().

◆ $m_message

ilMailTemplate::$m_message = ''
protected

Definition at line 38 of file class.ilMailTemplate.php.

Referenced by getMessage(), and setMessage().

◆ $m_subject

ilMailTemplate::$m_subject = ''
protected

Definition at line 33 of file class.ilMailTemplate.php.

Referenced by getSubject(), and setSubject().

◆ $title

ilMailTemplate::$title = ''
protected

Definition at line 18 of file class.ilMailTemplate.php.

Referenced by getTitle(), and setTitle().

◆ $tpl_id

ilMailTemplate::$tpl_id = 0
protected

Definition at line 13 of file class.ilMailTemplate.php.

Referenced by getTplId(), and setTplId().


The documentation for this class was generated from the following file: