ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 103 of file class.ilMembershipMailGUI.php.

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

Referenced by sendMailToSelectedUsers().

104  {
105  $GLOBALS['lng']->loadLanguageModule($this->getCurrentObject()->object->getType());
106 
107  $link = chr(13).chr(10).chr(13).chr(10);
108  $link .= $this->lng->txt($this->getCurrentObject()->object->getType().'_mail_permanent_link');
109  $link .= chr(13).chr(10).chr(13).chr(10);
110  include_once 'Services/Link/classes/class.ilLink.php';
111  $link .= ilLink::_getLink($this->getCurrentObject()->object->getRefId());
112  return rawurlencode(base64_encode($link));
113  }
$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.

References $cmd.

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

◆ 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 62 of file class.ilMembershipMailGUI.php.

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

63  {
64  if(isset($_GET['member_id']))
65  {
66  $_POST['participants'] = array($_GET['member_id']);
67  }
68  else
69  {
70  $_POST['participants'] = array_unique(array_merge(
71  (array) $_POST['admins'],
72  (array) $_POST['tutors'],
73  (array) $_POST['members'],
74  (array) $_POST['roles'],
75  (array) $_POST['waiting'],
76  (array) $_POST['subscribers']));
77  }
78 
79  if (!count($_POST['participants']))
80  {
81  ilUtil::sendFailure($GLOBALS['lng']->txt("no_checkbox"),TRUE);
82  $this->ctrl->returnToParent($this);
83  return false;
84  }
85  foreach($_POST['participants'] as $usr_id)
86  {
87  $rcps[] = ilObjUser::_lookupLogin($usr_id);
88  }
89 
90  require_once 'Services/Mail/classes/class.ilMailFormCall.php';
92  $this->getCurrentObject(),
93  'members',
94  array(),
95  array('type' => 'new', 'rcp_to' => implode(',',$rcps),'sig' => $this->createMailSignature())));
96  return true;
97  }
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)
http redirect to other 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: