ILIAS  trunk Revision v11.0_alpha-2662-g519ff7d528f
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.

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

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  }
setTplId(int $template_id)
setContext(string $context)
setTitle(string $title)
setLang(string $lang)
setMessage(string $message)
setAsDefault(bool $is_default)
setSubject(string $subject)
+ Here is the call graph for this function:

Member Function Documentation

◆ getContext()

ilMailTemplate::getContext ( )

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

References $context.

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

80  : string
81  {
82  return $this->context;
83  }
+ Here is the caller graph for this function:

◆ getLang()

ilMailTemplate::getLang ( )

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

References $lang.

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

90  : string
91  {
92  return $this->lang;
93  }
+ Here is the caller graph for this function:

◆ getMessage()

ilMailTemplate::getMessage ( )

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

References $message.

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

110  : string
111  {
112  return $this->message;
113  }
+ Here is the caller graph for this function:

◆ getSubject()

ilMailTemplate::getSubject ( )

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

References $subject.

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

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

◆ getTitle()

ilMailTemplate::getTitle ( )

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

References $title.

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

70  : string
71  {
72  return $this->title;
73  }
+ Here is the caller graph for this function:

◆ getTplId()

◆ isDefault()

ilMailTemplate::isDefault ( )

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

References $is_default.

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

120  : bool
121  {
122  return $this->is_default;
123  }
+ Here is the caller graph for this function:

◆ setAsDefault()

ilMailTemplate::setAsDefault ( bool  $is_default)

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

References $is_default.

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

125  : void
126  {
127  $this->is_default = $is_default;
128  }
+ Here is the caller graph for this function:

◆ setContext()

ilMailTemplate::setContext ( string  $context)

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

References $context.

Referenced by __construct().

85  : void
86  {
87  $this->context = $context;
88  }
+ Here is the caller graph for this function:

◆ setLang()

ilMailTemplate::setLang ( string  $lang)

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

References $lang.

Referenced by __construct().

95  : void
96  {
97  $this->lang = $lang;
98  }
+ Here is the caller graph for this function:

◆ setMessage()

ilMailTemplate::setMessage ( string  $message)

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

References $message.

Referenced by __construct().

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

◆ setSubject()

ilMailTemplate::setSubject ( string  $subject)

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

References $subject.

Referenced by __construct().

105  : void
106  {
107  $this->subject = $subject;
108  }
+ Here is the caller graph for this function:

◆ setTitle()

ilMailTemplate::setTitle ( string  $title)

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

References $title.

Referenced by __construct().

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

◆ setTplId()

ilMailTemplate::setTplId ( int  $template_id)

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

References $template_id.

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

65  : void
66  {
67  $this->template_id = $template_id;
68  }
+ 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.

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

Referenced by ilMailTemplateService\listAllTemplatesAsArray().

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  }
+ 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: