ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilSendMailActivity Class Reference

PhpIncludeInspection More...

+ Inheritance diagram for ilSendMailActivity:
+ Collaboration diagram for ilSendMailActivity:

Public Member Functions

 __construct (ilNode $a_context)
 Default constructor. More...
 
 getContext ()
 Returns a reference to the parent node. More...
 
 setName ($name)
 
 getName ()
 
 getMessageName ()
 
 setMessageName ($message_name)
 
 getParameters ()
 
 setParameters ($parameters)
 
 getOutputs ()
 
 setOutputs ($outputs)
 
 decodeMessageText ($message_text)
 
 processPlaceholders ($message_text)
 
- Public Member Functions inherited from ilActivity
 execute ()
 

Protected Attributes

 $name
 

Private Attributes

 $context
 
 $message_name
 
 $parameters
 
 $outputs
 

Detailed Description

PhpIncludeInspection

PhpIncludeInspection Class ilSendMailActivity

This activity setup and send or read an email.

Author
Maximilian Becker mbeck.nosp@m.er@d.nosp@m.ataba.nosp@m.y.de
Version
$Id$

/

Definition at line 19 of file class.ilSendMailActivity.php.

Constructor & Destructor Documentation

◆ __construct()

ilSendMailActivity::__construct ( ilNode  $a_context)

Default constructor.

Parameters
ilNode$a_context

Definition at line 41 of file class.ilSendMailActivity.php.

References decodeMessageText(), ilActivity\execute(), getContext(), and processPlaceholders().

42  {
43  $this->context = $a_context;
44  }
+ Here is the call graph for this function:

Member Function Documentation

◆ decodeMessageText()

ilSendMailActivity::decodeMessageText (   $message_text)

Definition at line 166 of file class.ilSendMailActivity.php.

Referenced by __construct().

167  {
168  return base64_decode($message_text);
169  }
+ Here is the caller graph for this function:

◆ getContext()

ilSendMailActivity::getContext ( )

Returns a reference to the parent node.

Returns
ilNode Reference to the parent node.

Implements ilWorkflowEngineElement.

Definition at line 97 of file class.ilSendMailActivity.php.

References $context.

Referenced by __construct().

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

◆ getMessageName()

ilSendMailActivity::getMessageName ( )
Returns
string

Definition at line 121 of file class.ilSendMailActivity.php.

References $message_name.

122  {
123  return $this->message_name;
124  }

◆ getName()

ilSendMailActivity::getName ( )
Returns
string

Implements ilWorkflowEngineElement.

Definition at line 113 of file class.ilSendMailActivity.php.

References $name.

114  {
115  return $this->name;
116  }

◆ getOutputs()

ilSendMailActivity::getOutputs ( )
Returns
array

Definition at line 153 of file class.ilSendMailActivity.php.

References $outputs.

154  {
155  return $this->outputs;
156  }

◆ getParameters()

ilSendMailActivity::getParameters ( )
Returns
array

Definition at line 137 of file class.ilSendMailActivity.php.

References $parameters.

138  {
139  return $this->parameters;
140  }

◆ processPlaceholders()

ilSendMailActivity::processPlaceholders (   $message_text)

Definition at line 171 of file class.ilSendMailActivity.php.

References $DIC, $params, ilUtil\_getHttpPath(), and array.

Referenced by __construct().

172  {
173  $matches = array();
174  preg_match_all('/\[(.*?)\]/',$message_text, $matches, PREG_PATTERN_ORDER);
175 
176  foreach($matches[0] as $match)
177  {
178  $placeholder = substr($match, 1, strlen($match)-2);
179 
180  $handled = false;
181  if(strtolower(substr($placeholder, 0 , strlen('EVENTLINK'))) == 'eventlink')
182  {
183  $handled = true;
184  $content = $this->getEventLink($match);
185  }
186 
187  if(!$handled)
188  {
189  $content = $this->context->getContext()->getInstanceVarById($placeholder);
190  }
191 
192  if(strlen($content))
193  {
194  $message_text = str_replace($match, $content, $message_text);
195  }
196  }
197  return $message_text;
198  }
Create styles array
The data for the language used.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setMessageName()

ilSendMailActivity::setMessageName (   $message_name)
Parameters
string$message_name

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

References $message_name.

130  {
131  $this->message_name = $message_name;
132  }

◆ setName()

ilSendMailActivity::setName (   $name)
Parameters
string$name

Implements ilWorkflowEngineElement.

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

References $name.

106  {
107  $this->name = $name;
108  }

◆ setOutputs()

ilSendMailActivity::setOutputs (   $outputs)
Parameters
array$outputs

Definition at line 161 of file class.ilSendMailActivity.php.

References $outputs.

162  {
163  $this->outputs = $outputs;
164  }

◆ setParameters()

ilSendMailActivity::setParameters (   $parameters)
Parameters
array$parameters

Definition at line 145 of file class.ilSendMailActivity.php.

References $parameters.

146  {
147  $this->parameters = $parameters;
148  }

Field Documentation

◆ $context

ilSendMailActivity::$context
private

Definition at line 22 of file class.ilSendMailActivity.php.

Referenced by getContext().

◆ $message_name

ilSendMailActivity::$message_name
private

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

Referenced by getMessageName(), and setMessageName().

◆ $name

ilSendMailActivity::$name
protected

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

Referenced by getName(), and setName().

◆ $outputs

ilSendMailActivity::$outputs
private

Definition at line 34 of file class.ilSendMailActivity.php.

Referenced by getOutputs(), and setOutputs().

◆ $parameters

ilSendMailActivity::$parameters
private

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

Referenced by getParameters(), and setParameters().


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