ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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 }
static http()
Fetches the global http state from ILIAS.
$DIC
Definition: xapitoken.php:46

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
124
126 if (count($users) > 0) {
127 if (!$user->getId() || $user->getId() == ANONYMOUS_USER_ID) {
129 $request_scheme =
130 isset($http->request()->getServerParams()['HTTPS'])
131 && $http->request()->getServerParams()['HTTPS'] !== 'off'
132 ? 'https' : 'http';
133 $url = $request_scheme . '://'
134 . $http->request()->getServerParams()['HTTP_HOST']
135 . $http->request()->getServerParams()['REQUEST_URI'];
136 return "mailto:" . $mails . "?body=%0D%0A%0D%0A" . $lng->txt("report_accessibility_link_mailto") . "%0A" . rawurlencode($url);
137 } else {
138 return $ctrl->getLinkTargetByClass("ilaccessibilitysupportcontactsgui", "");
139 }
140 }
141 return "";
142 }
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms @access public
$url

References $ctrl, $DIC, $http, $lng, $url, 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 149 of file class.ilAccessibilitySupportContactsGUI.php.

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

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, $cmd, array $gui_params=array(), array $mail_params=array(), array $context_params=array())

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: