ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilMembershipMailGUI Class Reference

Membership Mail GUI. More...

+ Collaboration diagram for ilMembershipMailGUI:

Public Member Functions

 __construct (ilObjectGUI $object)
 
 getCurrentObject ()
 
 executeCommand ()
 execute command More...
 
 sendMailToSelectedUsers ()
 show send mail More...
 

Protected Member Functions

 createMailSignature ()
 Create a course mail signature. More...
 

Protected Attributes

 $ctrl
 
 $lng
 

Private Attributes

 $object = null
 

Detailed Description

Membership Mail GUI.

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

Definition at line 13 of file class.ilMembershipMailGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilMembershipMailGUI::__construct ( ilObjectGUI  $object)

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

References $ilCtrl, $lng, and $object.

20  {
21  global $ilCtrl, $lng;
22 
23  $this->object = $object;
24  $this->ctrl = $ilCtrl;
25  $this->lng = $lng;
26  }
global $ilCtrl
Definition: ilias.php:18

Member Function Documentation

◆ createMailSignature()

ilMembershipMailGUI::createMailSignature ( )
protected

Create a course mail signature.

Returns

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

References $GLOBALS, ilLink\_getLink(), getCurrentObject(), and object.

Referenced by sendMailToSelectedUsers().

100  {
101  $GLOBALS['lng']->loadLanguageModule($this->getCurrentObject()->object->getType());
102 
103  $link = chr(13) . chr(10) . chr(13) . chr(10);
104  $link .= $this->lng->txt($this->getCurrentObject()->object->getType() . '_mail_permanent_link');
105  $link .= chr(13) . chr(10) . chr(13) . chr(10);
106  include_once 'Services/Link/classes/class.ilLink.php';
107  $link .= ilLink::_getLink($this->getCurrentObject()->object->getRefId());
108  return rawurlencode(base64_encode($link));
109  }
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
Create new PHPExcel object
obj_idprivate
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilMembershipMailGUI::executeCommand ( )

execute command

public

Returns

Definition at line 39 of file class.ilMembershipMailGUI.php.

40  {
41  $next_class = $this->ctrl->getNextClass($this);
42  $cmd = $this->ctrl->getCmd();
43 
44  switch ($next_class) {
45 
46  default:
47  $this->$cmd();
48  break;
49  }
50 
51  return true;
52  }

◆ getCurrentObject()

ilMembershipMailGUI::getCurrentObject ( )

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

References $object.

Referenced by createMailSignature(), and sendMailToSelectedUsers().

29  {
30  return $this->object;
31  }
+ Here is the caller graph for this function:

◆ sendMailToSelectedUsers()

ilMembershipMailGUI::sendMailToSelectedUsers ( )

show send mail

public

Parameters

Definition at line 61 of file class.ilMembershipMailGUI.php.

References $_GET, $_POST, $GLOBALS, ilObjUser\_lookupLogin(), array, createMailSignature(), getCurrentObject(), ilMailFormCall\getRedirectTarget(), ilUtil\redirect(), and ilUtil\sendFailure().

62  {
63  if (isset($_GET['member_id'])) {
64  $_POST['participants'] = array($_GET['member_id']);
65  } else {
66  $_POST['participants'] = array_unique(array_merge(
67  (array) $_POST['admins'],
68  (array) $_POST['tutors'],
69  (array) $_POST['members'],
70  (array) $_POST['roles'],
71  (array) $_POST['waiting'],
72  (array) $_POST['subscribers']
73  ));
74  }
75 
76  if (!count($_POST['participants'])) {
77  ilUtil::sendFailure($GLOBALS['lng']->txt("no_checkbox"), true);
78  $this->ctrl->returnToParent($this);
79  return false;
80  }
81  foreach ($_POST['participants'] as $usr_id) {
82  $rcps[] = ilObjUser::_lookupLogin($usr_id);
83  }
84 
85  require_once 'Services/Mail/classes/class.ilMailFormCall.php';
87  $this->getCurrentObject(),
88  'members',
89  array(),
90  array('type' => 'new', 'rcp_to' => implode(',', $rcps),'sig' => $this->createMailSignature())
91  ));
92  return true;
93  }
createMailSignature()
Create a course mail signature.
static _lookupLogin($a_user_id)
lookup login
$_GET["client_id"]
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
Create styles array
The data for the language used.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static getRedirectTarget($gui, $cmd, array $gui_params=array(), array $mail_params=array(), array $context_params=array())
static redirect($a_script)
$_POST["username"]
+ Here is the call graph for this function:

Field Documentation

◆ $ctrl

ilMembershipMailGUI::$ctrl
protected

Definition at line 15 of file class.ilMembershipMailGUI.php.

◆ $lng

ilMembershipMailGUI::$lng
protected

Definition at line 16 of file class.ilMembershipMailGUI.php.

Referenced by __construct().

◆ $object

ilMembershipMailGUI::$object = null
private

Definition at line 17 of file class.ilMembershipMailGUI.php.

Referenced by __construct(), and getCurrentObject().


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