ILIAS  release_7 Revision v7.30-3-g800a261c036
ilAccessibilitySupportContactsGUI Class Reference

Class ilAccessibilitySupportContactsGUI. More...

+ Collaboration diagram for ilAccessibilitySupportContactsGUI:

Public Member Functions

 __construct ()
 Constructor. More...
 
 executeCommand ()
 Execute command. More...
 
 sendIssueMail ()
 

Static Public Member Functions

static getFooterLink ()
 Get footer link. More...
 
static getFooterText ()
 Get footer text. More...
 

Protected Attributes

 $tpl
 
 $lng
 
 $ctrl
 
 $http
 

Private Member Functions

 getAccessibilityIssueMailMessage (string $back_url)
 
 getContactLogins ()
 Get accessibility support contacts as comma separated string. More...
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilAccessibilitySupportContactsGUI::__construct ( )

Constructor.

Definition at line 35 of file class.ilAccessibilitySupportContactsGUI.php.

36 {
37 global $DIC;
38
39 $ctrl = $DIC->ctrl();
40 $tpl = $DIC["tpl"];
41 $lng = $DIC->language();
42 $http = $DIC->http();
43
44 $this->ctrl = $ctrl;
45 $this->tpl = $tpl;
46 $this->lng = $lng;
47 $this->http = $http;
48 }
global $DIC
Definition: goto.php:24
static http()
Fetches the global http state from ILIAS.

References $ctrl, $DIC, $http, $lng, $tpl, and ILIAS\FileDelivery\http().

+ Here is the call graph for this function:

Member Function Documentation

◆ executeCommand()

ilAccessibilitySupportContactsGUI::executeCommand ( )

Execute command.

Definition at line 54 of file class.ilAccessibilitySupportContactsGUI.php.

55 {
56 $cmd = $this->ctrl->getCmd("sendIssueMail");
57 if (in_array($cmd, array("sendIssueMail"))) {
58 $this->$cmd();
59 }
60 }

◆ getAccessibilityIssueMailMessage()

ilAccessibilitySupportContactsGUI::getAccessibilityIssueMailMessage ( string  $back_url)
private
Returns
string

Definition at line 83 of file class.ilAccessibilitySupportContactsGUI.php.

83 : string
84 {
85 $sig = chr(13) . chr(10) . chr(13) . chr(10) . chr(13) . chr(10);
86 $sig .= $this->lng->txt('report_accessibility_link');
87 $sig .= chr(13) . chr(10);
88 $sig .= $back_url;
89 $sig = rawurlencode(base64_encode($sig));
90
91 return $sig;
92 }

Referenced by sendIssueMail().

+ Here is the caller graph for this function:

◆ getContactLogins()

ilAccessibilitySupportContactsGUI::getContactLogins ( )
private

Get accessibility support contacts as comma separated string.

Returns
string

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

99 : string
100 {
101 $logins = [];
102
104 $logins[] = ilObjUser::_lookupLogin($contact_id);
105 }
106
107 return implode(',', $logins);
108 }
static getValidSupportContactIds()
Get valid support contacts.
static _lookupLogin($a_user_id)
lookup login

References ilObjUser\_lookupLogin(), and ilAccessibilitySupportContacts\getValidSupportContactIds().

Referenced by sendIssueMail().

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

◆ getFooterLink()

static ilAccessibilitySupportContactsGUI::getFooterLink ( )
static

Get footer link.

Returns
string footer link

Definition at line 115 of file class.ilAccessibilitySupportContactsGUI.php.

116 {
117 global $DIC;
118
119 $ctrl = $DIC->ctrl();
120 $user = $DIC->user();
121 $http = $DIC->http();
122 $lng = $DIC->language();
123 $rbac_system = $DIC->rbac()->system();
124
126 if (count($contacts) > 0) {
127 if ($rbac_system->checkAccess("internal_mail", ilMailGlobalServices::getMailObjectRefId())) {
128 return $ctrl->getLinkTargetByClass("ilaccessibilitysupportcontactsgui", "");
129 } else {
132 );
133 $request_scheme =
134 isset($http->request()->getServerParams()['HTTPS'])
135 && $http->request()->getServerParams()['HTTPS'] !== 'off'
136 ? 'https' : 'http';
137 $url = $request_scheme . '://'
138 . $http->request()->getServerParams()['HTTP_HOST']
139 . $http->request()->getServerParams()['REQUEST_URI'];
140 return "mailto:" . $mails . "?body=%0D%0A%0D%0A" . $lng->txt("report_accessibility_link_mailto") . "%0A" . rawurlencode($url);
141 }
142 }
143 return "";
144 }
static getMailObjectRefId()
Determines the reference id of the mail object and stores this information in a local cache variable.
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms @access public
$url

References $ctrl, $DIC, $http, $lng, $url, ilMailGlobalServices\getMailObjectRefId(), ilAccessibilitySupportContacts\getMailsToAddress(), ilAccessibilitySupportContacts\getValidSupportContactIds(), and ilUtil\prepareFormOutput().

Referenced by ILIAS\UICore\PageContentProvider\getFooterModification().

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

◆ getFooterText()

static ilAccessibilitySupportContactsGUI::getFooterText ( )
static

Get footer text.

Returns
string footer text

Definition at line 151 of file class.ilAccessibilitySupportContactsGUI.php.

152 {
153 global $DIC;
154
155 $lng = $DIC->language();
156 return $lng->txt("report_accessibility_issue");
157 }

References $DIC, and $lng.

Referenced by ILIAS\UICore\PageContentProvider\getFooterModification().

+ Here is the caller graph for this function:

◆ sendIssueMail()

ilAccessibilitySupportContactsGUI::sendIssueMail ( )

Definition at line 63 of file class.ilAccessibilitySupportContactsGUI.php.

63 : void
64 {
65 $back_url = $this->http->request()->getServerParams()['HTTP_REFERER'];
66 $this->ctrl->redirectToURL(
68 $back_url,
69 '',
70 [],
71 [
72 'type' => 'new',
73 'rcp_to' => $this->getContactLogins(),
74 'sig' => $this->getAccessibilityIssueMailMessage($back_url)
75 ]
76 )
77 );
78 }
getContactLogins()
Get accessibility support contacts as comma separated string.
static getRedirectTarget( $gui, string $cmd, array $gui_params=[], array $mail_params=[], array $context_params=[])

References getAccessibilityIssueMailMessage(), getContactLogins(), ilMailFormCall\getRedirectTarget(), and ILIAS\FileDelivery\http().

+ Here is the call graph for this function:

Field Documentation

◆ $ctrl

ilAccessibilitySupportContactsGUI::$ctrl
protected

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

Referenced by __construct(), and getFooterLink().

◆ $http

ilAccessibilitySupportContactsGUI::$http
protected

Definition at line 30 of file class.ilAccessibilitySupportContactsGUI.php.

Referenced by __construct(), and getFooterLink().

◆ $lng

ilAccessibilitySupportContactsGUI::$lng
protected

◆ $tpl

ilAccessibilitySupportContactsGUI::$tpl
protected

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

Referenced by __construct().


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