ILIAS  trunk Revision v11.0_alpha-1761-g6dbbfa7b760
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilMailTemplate Class Reference

Class ilMailTemplate. More...

+ Collaboration diagram for ilMailTemplate:

Public Member Functions

 __construct (?array $data=null)
 
 toArray ()
 
 getTplId ()
 
 setTplId (int $templateId)
 
 getTitle ()
 
 setTitle (string $title)
 
 getContext ()
 
 setContext (string $context)
 
 getLang ()
 
 setLang (string $lang)
 
 getSubject ()
 
 setSubject (string $subject)
 
 getMessage ()
 
 setMessage (string $message)
 
 isDefault ()
 
 setAsDefault (bool $isDefault)
 

Protected Attributes

int $templateId = 0
 
string $title = ''
 
string $context = ''
 
string $lang = ''
 
string $subject = ''
 
string $message = ''
 
bool $isDefault = false
 

Detailed Description

Class ilMailTemplate.

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

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

Constructor & Destructor Documentation

◆ __construct()

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

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

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

36  {
37  if ($data) {
38  $this->setTplId((int) $data['tpl_id']);
39  $this->setTitle((string) $data['title']);
40  $this->setContext((string) $data['context']);
41  $this->setLang((string) $data['lang']);
42  $this->setSubject((string) $data['m_subject']);
43  $this->setMessage((string) $data['m_message']);
44  $this->setAsDefault((bool) $data['is_default']);
45  }
46  }
setContext(string $context)
setAsDefault(bool $isDefault)
setTitle(string $title)
setLang(string $lang)
setMessage(string $message)
setTplId(int $templateId)
setSubject(string $subject)
+ Here is the call graph for this function:

Member Function Documentation

◆ getContext()

ilMailTemplate::getContext ( )

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

References $context.

Referenced by ilMailTemplateRepository\findByContextId(), ilMailTemplateGUI\populateFormWithTemplate(), ilMailTemplateService\setAsContextDefault(), ilMailTemplateRepository\store(), and toArray().

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

◆ getLang()

ilMailTemplate::getLang ( )

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

References $lang.

Referenced by ilMailTemplateGUI\populateFormWithTemplate(), ilMailTemplateRepository\store(), and toArray().

94  : string
95  {
96  return $this->lang;
97  }
+ Here is the caller graph for this function:

◆ getMessage()

ilMailTemplate::getMessage ( )

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

References $message.

Referenced by ilMailTemplateGUI\populateFormWithTemplate(), ilMailTemplateRepository\store(), and toArray().

114  : string
115  {
116  return $this->message;
117  }
+ Here is the caller graph for this function:

◆ getSubject()

ilMailTemplate::getSubject ( )

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

References $subject.

Referenced by ilMailTemplateGUI\populateFormWithTemplate(), ilMailTemplateRepository\store(), and toArray().

104  : string
105  {
106  return $this->subject;
107  }
+ Here is the caller graph for this function:

◆ getTitle()

ilMailTemplate::getTitle ( )

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

References $title.

Referenced by ilMailTemplateGUI\populateFormWithTemplate(), ilMailTemplateRepository\store(), and toArray().

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

◆ getTplId()

◆ isDefault()

ilMailTemplate::isDefault ( )

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

References $isDefault.

Referenced by setAsDefault(), ilMailTemplateRepository\store(), and toArray().

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

◆ setAsDefault()

ilMailTemplate::setAsDefault ( bool  $isDefault)

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

References $isDefault, and isDefault().

Referenced by __construct(), and ilMailTemplateService\unsetAsContextDefault().

129  : void
130  {
131  $this->isDefault = $isDefault;
132  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setContext()

ilMailTemplate::setContext ( string  $context)

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

References $context.

Referenced by __construct().

89  : void
90  {
91  $this->context = $context;
92  }
+ Here is the caller graph for this function:

◆ setLang()

ilMailTemplate::setLang ( string  $lang)

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

References $lang.

Referenced by __construct().

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

◆ setMessage()

ilMailTemplate::setMessage ( string  $message)

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

References $message.

Referenced by __construct().

119  : void
120  {
121  $this->message = $message;
122  }
+ Here is the caller graph for this function:

◆ setSubject()

ilMailTemplate::setSubject ( string  $subject)

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

References $subject.

Referenced by __construct().

109  : void
110  {
111  $this->subject = $subject;
112  }
+ Here is the caller graph for this function:

◆ setTitle()

ilMailTemplate::setTitle ( string  $title)

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

References $title.

Referenced by __construct().

79  : void
80  {
81  $this->title = $title;
82  }
+ Here is the caller graph for this function:

◆ setTplId()

ilMailTemplate::setTplId ( int  $templateId)

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

References $templateId.

Referenced by __construct(), and ilMailTemplateRepository\store().

69  : void
70  {
71  $this->templateId = $templateId;
72  }
+ Here is the caller graph for this function:

◆ toArray()

ilMailTemplate::toArray ( )
Returns
array{tpl_id: int, title: string, context: string, lang: string, m_subject: string, m_message: string, is_default: bool}

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

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

Referenced by ilMailTemplateService\listAllTemplatesAsArray().

51  : array
52  {
53  return [
54  'tpl_id' => $this->getTplId(),
55  'title' => $this->getTitle(),
56  'context' => $this->getContext(),
57  'lang' => $this->getLang(),
58  'm_subject' => $this->getSubject(),
59  'm_message' => $this->getMessage(),
60  'is_default' => $this->isDefault(),
61  ];
62  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $context

string ilMailTemplate::$context = ''
protected

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

Referenced by getContext(), and setContext().

◆ $isDefault

bool ilMailTemplate::$isDefault = false
protected

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

Referenced by isDefault(), and setAsDefault().

◆ $lang

string ilMailTemplate::$lang = ''
protected

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

Referenced by getLang(), and setLang().

◆ $message

string ilMailTemplate::$message = ''
protected

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

Referenced by getMessage(), and setMessage().

◆ $subject

string ilMailTemplate::$subject = ''
protected

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

Referenced by getSubject(), and setSubject().

◆ $templateId

int ilMailTemplate::$templateId = 0
protected

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

Referenced by getTplId(), and setTplId().

◆ $title

string ilMailTemplate::$title = ''
protected

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

Referenced by getTitle(), and setTitle().


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