ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 = ''
 

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 43 of file class.ilMailTemplate.php.

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

44  {
45  if($data)
46  {
47  $this->setTplId($data['tpl_id']);
48  $this->setTitle($data['title']);
49  $this->setContext($data['context']);
50  $this->setLang($data['lang']);
51  $this->setSubject($data['m_subject']);
52  $this->setMessage($data['m_message']);
53  }
54  }
+ Here is the call graph for this function:

Member Function Documentation

◆ delete()

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

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

188  {
189 
190  }

◆ getContext()

ilMailTemplate::getContext ( )
Returns
string

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

References $context.

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

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

◆ getLang()

ilMailTemplate::getLang ( )
Returns
string

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

References $lang.

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

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

◆ getMessage()

ilMailTemplate::getMessage ( )
Returns
string

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

References $m_message.

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

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

◆ getSubject()

ilMailTemplate::getSubject ( )
Returns
string

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

References $m_subject.

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

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

◆ getTitle()

ilMailTemplate::getTitle ( )
Returns
string

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

References $title.

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

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

◆ getTplId()

ilMailTemplate::getTplId ( )
Returns
int

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

References $tpl_id.

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

60  {
61  return $this->tpl_id;
62  }
+ Here is the caller graph for this function:

◆ insert()

ilMailTemplate::insert ( )

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

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

153  {
154  global $ilDB;
155 
156  $next_id = $ilDB->nextId('mail_man_tpl');
157  $ilDB->insert('mail_man_tpl', array(
158  'tpl_id' => array('integer', $next_id),
159  'title' => array('text', $this->getTitle()),
160  'context' => array('text', $this->getContext()),
161  'lang' => array('text', $this->getLang()),
162  'm_subject' => array('text', $this->getSubject()),
163  'm_message' => array('text', $this->getMessage())
164  ));
165  }
Create styles array
The data for the language used.
global $ilDB
+ Here is the call graph for this function:

◆ setContext()

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

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

References $context.

Referenced by __construct().

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

◆ setLang()

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

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

References $lang.

Referenced by __construct().

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

◆ setMessage()

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

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

References $m_message.

Referenced by __construct().

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

◆ setSubject()

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

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

References $m_subject.

Referenced by __construct().

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

◆ setTitle()

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

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

References $title.

Referenced by __construct().

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

◆ setTplId()

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

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

References $tpl_id.

Referenced by __construct().

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

◆ update()

ilMailTemplate::update ( )

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

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

168  {
169  global $ilDB;
170 
171  $ilDB->update('mail_man_tpl',
172  array(
173  'title' => array('text', $this->getTitle()),
174  'context' => array('text', $this->getContext()),
175  'lang' => array('text', $this->getLang()),
176  'm_subject' => array('text', $this->getSubject()),
177  'm_message' => array('text', $this->getMessage())
178  ),
179  array(
180  'tpl_id' => array('integer', $this->getTplId()),
181  ));
182  }
Create styles array
The data for the language used.
global $ilDB
+ 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().

◆ $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: