ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilMailTemplate Class Reference
+ Collaboration diagram for ilMailTemplate:

Public Member Functions

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

Protected Attributes

int $template_id = 0
 
string $title = ''
 
string $context = ''
 
string $lang = ''
 
string $subject = ''
 
string $message = ''
 
bool $is_default = false
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

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

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

32 {
33 if ($data) {
34 $this->setTplId((int) $data['tpl_id']);
35 $this->setTitle((string) $data['title']);
36 $this->setContext((string) $data['context']);
37 $this->setLang((string) $data['lang']);
38 $this->setSubject((string) $data['m_subject']);
39 $this->setMessage((string) $data['m_message']);
40 $this->setAsDefault((bool) $data['is_default']);
41 }
42 }
setContext(string $context)
setTitle(string $title)
setMessage(string $message)
setAsDefault(bool $is_default)
setSubject(string $subject)
setLang(string $lang)
setTplId(int $template_id)

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

+ Here is the call graph for this function:

Member Function Documentation

◆ getContext()

ilMailTemplate::getContext ( )

◆ getLang()

ilMailTemplate::getLang ( )

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

90 : string
91 {
92 return $this->lang;
93 }

References $lang.

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

+ Here is the caller graph for this function:

◆ getMessage()

ilMailTemplate::getMessage ( )

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

110 : string
111 {
112 return $this->message;
113 }

References $message.

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

+ Here is the caller graph for this function:

◆ getSubject()

ilMailTemplate::getSubject ( )

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

100 : string
101 {
102 return $this->subject;
103 }

References $subject.

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

+ Here is the caller graph for this function:

◆ getTitle()

ilMailTemplate::getTitle ( )

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

70 : string
71 {
72 return $this->title;
73 }

References $title.

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

+ Here is the caller graph for this function:

◆ getTplId()

◆ isDefault()

ilMailTemplate::isDefault ( )

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

120 : bool
121 {
122 return $this->is_default;
123 }

References $is_default.

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

+ Here is the caller graph for this function:

◆ setAsDefault()

ilMailTemplate::setAsDefault ( bool  $is_default)

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

125 : void
126 {
127 $this->is_default = $is_default;
128 }

References $is_default.

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

+ Here is the caller graph for this function:

◆ setContext()

ilMailTemplate::setContext ( string  $context)

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

85 : void
86 {
87 $this->context = $context;
88 }

References $context.

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setLang()

ilMailTemplate::setLang ( string  $lang)

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

95 : void
96 {
97 $this->lang = $lang;
98 }

References $lang.

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setMessage()

ilMailTemplate::setMessage ( string  $message)

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

115 : void
116 {
117 $this->message = $message;
118 }

References $message.

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setSubject()

ilMailTemplate::setSubject ( string  $subject)

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

105 : void
106 {
107 $this->subject = $subject;
108 }

References $subject.

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setTitle()

ilMailTemplate::setTitle ( string  $title)

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

75 : void
76 {
77 $this->title = $title;
78 }

References $title.

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setTplId()

ilMailTemplate::setTplId ( int  $template_id)

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

65 : void
66 {
67 $this->template_id = $template_id;
68 }

References $template_id.

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

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

47 : array
48 {
49 return [
50 'tpl_id' => $this->getTplId(),
51 'title' => $this->getTitle(),
52 'context' => $this->getContext(),
53 'lang' => $this->getLang(),
54 'm_subject' => $this->getSubject(),
55 'm_message' => $this->getMessage(),
56 'is_default' => $this->isDefault(),
57 ];
58 }

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

Referenced by ilMailTemplateService\listAllTemplatesAsArray().

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

Referenced by getContext(), and setContext().

◆ $is_default

bool ilMailTemplate::$is_default = false
protected

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

Referenced by isDefault(), and setAsDefault().

◆ $lang

string ilMailTemplate::$lang = ''
protected

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

Referenced by getLang(), and setLang().

◆ $message

string ilMailTemplate::$message = ''
protected

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

Referenced by getMessage(), and setMessage().

◆ $subject

string ilMailTemplate::$subject = ''
protected

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

Referenced by getSubject(), and setSubject().

◆ $template_id

int ilMailTemplate::$template_id = 0
protected

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

Referenced by getTplId(), and setTplId().

◆ $title

string ilMailTemplate::$title = ''
protected

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

Referenced by getTitle(), and setTitle().


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