ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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.

20 {
21 global $DIC;
22
23 $ilCtrl = $DIC['ilCtrl'];
24 $lng = $DIC['lng'];
25
26 $this->object = $object;
27 $this->ctrl = $ilCtrl;
28 $this->lng = $lng;
29 }
global $ilCtrl
Definition: ilias.php:18
$DIC
Definition: xapitoken.php:46

References $DIC, $ilCtrl, $lng, and $object.

Member Function Documentation

◆ createMailSignature()

ilMembershipMailGUI::createMailSignature ( )
protected

Create a course mail signature.

Returns

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

103 {
104 $GLOBALS['DIC']['lng']->loadLanguageModule($this->getCurrentObject()->object->getType());
105
106 $link = chr(13) . chr(10) . chr(13) . chr(10);
107 $link .= $this->lng->txt($this->getCurrentObject()->object->getType() . '_mail_permanent_link');
108 $link .= chr(13) . chr(10) . chr(13) . chr(10);
109 include_once 'Services/Link/classes/class.ilLink.php';
110 $link .= ilLink::_getLink($this->getCurrentObject()->object->getRefId());
111 return rawurlencode(base64_encode($link));
112 }
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64

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

Referenced by sendMailToSelectedUsers().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilMembershipMailGUI::executeCommand ( )

execute command

@access public

Returns

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

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

◆ getCurrentObject()

ilMembershipMailGUI::getCurrentObject ( )

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

32 {
33 return $this->object;
34 }

References $object.

Referenced by createMailSignature(), and sendMailToSelectedUsers().

+ Here is the caller graph for this function:

◆ sendMailToSelectedUsers()

ilMembershipMailGUI::sendMailToSelectedUsers ( )

show send mail

@access public

Parameters

return

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

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

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

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