ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f87
ilMembershipGUI Class Reference

Membership GUI. More...

+ Collaboration diagram for ilMembershipGUI:

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 GUI.

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

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

Constructor & Destructor Documentation

◆ __construct()

ilMembershipGUI::__construct ( ilObjectGUI  $object)

Definition at line 19 of file class.ilMembershipGUI.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()

ilMembershipGUI::createMailSignature ( )
protected

Create a course mail signature.

Returns

Definition at line 103 of file class.ilMembershipGUI.php.

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

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['ct_recipient']
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ executeCommand()

ilMembershipGUI::executeCommand ( )

execute command

public

Returns

Definition at line 39 of file class.ilMembershipGUI.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()

ilMembershipGUI::getCurrentObject ( )

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

References $object.

Referenced by createMailSignature(), and sendMailToSelectedUsers().

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

◆ sendMailToSelectedUsers()

ilMembershipGUI::sendMailToSelectedUsers ( )

show send mail

public

Parameters

Definition at line 62 of file class.ilMembershipGUI.php.

References $_GET, $_POST, $GLOBALS, ilObjUser\_lookupLogin(), 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  }
static getRedirectTarget($gui, $cmd, Array $gui_params=array(), Array $mail_params=array())
$_POST['username']
Definition: cron.php:12
$_GET["client_id"]
$GLOBALS['ct_recipient']
createMailSignature()
Create a course mail signature.
_lookupLogin($a_user_id)
lookup login
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static redirect($a_script)
http redirect to other script
+ Here is the call graph for this function:

Field Documentation

◆ $ctrl

ilMembershipGUI::$ctrl
protected

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

◆ $lng

ilMembershipGUI::$lng
protected

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

Referenced by __construct().

◆ $object

ilMembershipGUI::$object = null
private

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

Referenced by __construct(), and getCurrentObject().


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