◆ __construct()
ilMailSearchObjectGUI::__construct |
( |
protected |
$wsp_access_handler = null , |
|
|
protected ?int |
$wsp_node_id = null |
|
) |
| |
- Parameters
-
- Exceptions
-
Definition at line 47 of file class.ilMailSearchObjectGUI.php.
References $DIC, ILIAS\Repository\ctrl(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), ILIAS\Repository\refinery(), and ILIAS\Repository\user().
51 $this->tpl = $DIC[
'tpl'];
52 $this->
ctrl = $DIC[
'ilCtrl'];
53 $this->
lng = $DIC[
'lng'];
54 $this->
user = $DIC[
'ilUser'];
55 $this->error = $DIC[
'ilErr'];
56 $this->rbacsystem = $DIC[
'rbacsystem'];
57 $this->rbacreview = $DIC[
'rbacreview'];
58 $this->tree = $DIC[
'tree'];
59 $this->cache = $DIC[
'ilObjDataCache'];
60 $this->
http = $DIC->http();
62 $this->ui_factory = $DIC->ui()->factory();
63 $this->ui_renderer = $DIC->ui()->renderer();
65 $this->
ctrl->saveParameter($this,
'mobj_id');
66 $this->
ctrl->saveParameter($this,
'ref');
69 $this->mailing_allowed = $this->rbacsystem->checkAccess(
'internal_mail', $mail->getMailObjectReferenceId());
73 $this->
lng->loadLanguageModule(
'mail');
static http()
Fetches the global http state from ILIAS.
◆ addPermission()
ilMailSearchObjectGUI::addPermission |
( |
array |
$a_obj_ids | ) |
|
|
protected |
◆ cancel()
ilMailSearchObjectGUI::cancel |
( |
| ) |
|
Definition at line 356 of file class.ilMailSearchObjectGUI.php.
References $context, $data, $path, $ref_id, $relation, ilObject\_getAllReferences(), ilParticipants\_getMembershipByType(), ilObject\_hasUntrashedReference(), ilObjUser\_lookupActive(), ilObjUser\_lookupPref(), ilUtil\_sortIds(), ilParticipants\canSendMailToMembers(), ilStr\convertUpperCamelCaseToUnderscoreCase(), ILIAS\Repository\ctrl(), doesExposeMembers(), ilSession\get(), ilObjUser\getActive(), getContext(), ilObjUser\getFirstname(), ilObject\getId(), ilBuddySystem\getInstance(), ilBuddyList\getInstanceByGlobalUser(), ilObjectFactory\getInstanceByObjId(), ilParticipants\getInstanceByObjId(), ilObjUser\getLastname(), ilObjUser\getLogin(), ilMailGlobalServices\getMailObjectRefId(), getObjectType(), ilObject\getRefId(), ilObject\getTitle(), ILIAS\FileDelivery\http(), isDefaultRequestContext(), ILIAS\Repository\lng(), null, ILIAS\Repository\refinery(), ilSession\set(), ilObject\setRefId(), ILIAS\Refinery\transform(), and ILIAS\Repository\user().
359 if ($this->
http->wrapper()->query()->has(
'view')) {
360 $view = $this->
http->wrapper()->query()->retrieve(
'view', $this->
refinery->kindlyTo()->string());
364 $this->
ctrl->returnToParent($this);
366 $this->showMyObjects();
static http()
Fetches the global http state from ILIAS.
isDefaultRequestContext()
◆ doesExposeMembers()
ilMailSearchObjectGUI::doesExposeMembers |
( |
ilObject |
$object | ) |
|
|
abstractprotected |
◆ executeCommand()
ilMailSearchObjectGUI::executeCommand |
( |
| ) |
|
◆ getContext()
ilMailSearchObjectGUI::getContext |
( |
| ) |
|
|
private |
◆ getLocalDefaultRolePrefixes()
ilMailSearchObjectGUI::getLocalDefaultRolePrefixes |
( |
| ) |
|
|
abstractprotected |
- Returns
- string[] Returns an array like ['il_crs_member_', 'il_crs_tutor', ...]
Referenced by isLocalRoleTitle().
◆ getObjectType()
ilMailSearchObjectGUI::getObjectType |
( |
| ) |
|
|
abstractprotected |
◆ getRequestValue()
Definition at line 112 of file class.ilMailSearchObjectGUI.php.
References ILIAS\FileDelivery\http().
115 if ($this->
http->wrapper()->query()->has($key)) {
116 $value = $this->
http->wrapper()->query()->retrieve($key, $trafo);
119 if ($this->
http->wrapper()->post()->has($key)) {
120 $value = $this->
http->wrapper()->post()->retrieve($key, $trafo);
static http()
Fetches the global http state from ILIAS.
◆ isDefaultRequestContext()
ilMailSearchObjectGUI::isDefaultRequestContext |
( |
| ) |
|
|
private |
◆ isLocalRoleTitle()
ilMailSearchObjectGUI::isLocalRoleTitle |
( |
string |
$title | ) |
|
|
private |
◆ mail()
ilMailSearchObjectGUI::mail |
( |
| ) |
|
|
protected |
Definition at line 195 of file class.ilMailSearchObjectGUI.php.
References getObjectType(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), mailMembers(), mailObjects(), and ILIAS\Repository\refinery().
198 if ($this->
http->wrapper()->query()->has(
'view')) {
199 $view = $this->
http->wrapper()->query()->retrieve(
'view', $this->
refinery->kindlyTo()->string());
202 if (
$view ===
'myobjects') {
206 $this->
http->wrapper()->query()->retrieve(
211 } elseif ($this->
http->wrapper()->post()->has(
'search_' . $this->
getObjectType())) {
212 $obj_ids = $this->
http->wrapper()->post()->retrieve(
218 if ($obj_ids !== []) {
221 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
'mail_select_' . $this->getObjectType()));
222 $this->showMyObjects();
226 if ($this->
http->wrapper()->query()->has(
'search_members')) {
228 $this->
http->wrapper()->query()->retrieve(
233 } elseif ($this->
http->wrapper()->post()->has(
'search_members')) {
234 $usr_ids = $this->
http->wrapper()->post()->retrieve(
240 if ($usr_ids !== []) {
243 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
'mail_select_one_entry'));
244 $this->showMembers();
247 $this->showMyObjects();
static http()
Fetches the global http state from ILIAS.
◆ mailMembers()
ilMailSearchObjectGUI::mailMembers |
( |
| ) |
|
Definition at line 313 of file class.ilMailSearchObjectGUI.php.
References ilObjUser\_lookupLogin(), ILIAS\Repository\ctrl(), ILIAS\FileDelivery\http(), and ILIAS\Repository\refinery().
Referenced by mail().
317 if ($this->
http->wrapper()->query()->has(
'search_members')) {
319 $this->
http->wrapper()->query()->retrieve(
324 } elseif ($this->
http->wrapper()->post()->has(
'search_members')) {
325 $usr_ids = $this->
http->wrapper()->post()->retrieve(
331 $mail_data = $this->umail->retrieveFromStage();
332 foreach ($usr_ids as $usr_id) {
334 if (!$this->umail->existsRecipient($login, (
string) $mail_data[
'rcp_to'])) {
338 $mail_data = $this->umail->appendSearchResult(array_unique($members),
'to');
340 $this->umail->persistToStage(
341 (
int) $mail_data[
'user_id'],
342 $mail_data[
'attachments'],
343 $mail_data[
'rcp_to'],
344 $mail_data[
'rcp_cc'],
345 $mail_data[
'rcp_bcc'],
346 $mail_data[
'm_subject'],
347 $mail_data[
'm_message'],
348 $mail_data[
'use_placeholders'],
349 $mail_data[
'tpl_ctx_id'],
350 $mail_data[
'tpl_ctx_params']
353 $this->
ctrl->redirectToURL(
'ilias.php?baseClass=ilMailGUI&type=search_res');
static http()
Fetches the global http state from ILIAS.
static _lookupLogin(int $a_user_id)
◆ mailObjects()
ilMailSearchObjectGUI::mailObjects |
( |
| ) |
|
|
protected |
Definition at line 251 of file class.ilMailSearchObjectGUI.php.
References $ref_id, ilObject\_getAllReferences(), ilParticipants\canSendMailToMembers(), ILIAS\Repository\ctrl(), ilMailGlobalServices\getMailObjectRefId(), getObjectType(), ILIAS\FileDelivery\http(), isLocalRoleTitle(), ILIAS\Repository\refinery(), and ILIAS\Repository\user().
Referenced by mail().
254 $mail_data = $this->umail->retrieveFromStage();
259 $this->
http->wrapper()->query()->retrieve(
264 } elseif ($this->
http->wrapper()->post()->has(
'search_' . $this->
getObjectType())) {
265 $obj_ids = $this->
http->wrapper()->post()->retrieve(
271 foreach ($obj_ids as $obj_id) {
273 foreach ($ref_ids as
$ref_id) {
276 $this->
user->getId(),
279 if (!$can_send_mails) {
283 $roles = $this->rbacreview->getAssignableChildRoles($ref_id);
284 foreach ($roles as $role) {
287 if (!$this->umail->existsRecipient($recipient, (
string) $mail_data[
'rcp_to'])) {
288 $members[] = $recipient;
295 $mail_data = $members !== [] ? $this->umail->appendSearchResult(array_unique($members),
'to') : $this->umail->retrieveFromStage();
297 $this->umail->persistToStage(
298 (
int) $mail_data[
'user_id'],
299 $mail_data[
'attachments'],
300 $mail_data[
'rcp_to'],
301 $mail_data[
'rcp_cc'],
302 $mail_data[
'rcp_bcc'],
303 $mail_data[
'm_subject'],
304 $mail_data[
'm_message'],
305 $mail_data[
'use_placeholders'],
306 $mail_data[
'tpl_ctx_id'],
307 $mail_data[
'tpl_ctx_params']
310 $this->
ctrl->redirectToURL(
'ilias.php?baseClass=ilMailGUI&type=search_res');
static _getAllReferences(int $id)
get all reference ids for object ID
Class ilRoleMailboxAddress.
isLocalRoleTitle(string $title)
static http()
Fetches the global http state from ILIAS.
static getMailObjectRefId()
static canSendMailToMembers(int|ilObject $ref_id_or_instance, ?int $usr_id=null, ?int $mail_obj_ref_id=null)
This method was introduced as a band-aid fix for #22764.
◆ share()
ilMailSearchObjectGUI::share |
( |
| ) |
|
|
protected |
Definition at line 139 of file class.ilMailSearchObjectGUI.php.
References addPermission(), getObjectType(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), and ILIAS\Repository\refinery().
142 if ($this->
http->wrapper()->query()->has(
'view')) {
143 $view = $this->
http->wrapper()->query()->retrieve(
'view', $this->
refinery->kindlyTo()->string());
146 if (
$view ===
'myobjects') {
150 $this->
http->wrapper()->query()->retrieve(
155 } elseif ($this->
http->wrapper()->post()->has(
'search_' . $this->
getObjectType())) {
156 $obj_ids = $this->
http->wrapper()->post()->retrieve(
162 if ($obj_ids !== []) {
165 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
'mail_select_' . $this->getObjectType()));
166 $this->showMyObjects();
170 if ($this->
http->wrapper()->query()->has(
'search_members')) {
172 $this->
http->wrapper()->query()->retrieve(
177 } elseif ($this->
http->wrapper()->post()->has(
'search_members')) {
178 $usr_ids = $this->
http->wrapper()->post()->retrieve(
184 if ($usr_ids !== []) {
187 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
'mail_select_one_entry'));
188 $this->showMembers();
191 $this->showMyObjects();
addPermission(array $a_obj_ids)
static http()
Fetches the global http state from ILIAS.
◆ $cache
◆ $ctrl
◆ $error
◆ $http
◆ $lng
◆ $mailing_allowed
bool ilMailSearchObjectGUI::$mailing_allowed |
|
protected |
◆ $rbacreview
◆ $rbacsystem
◆ $refinery
Refinery ilMailSearchObjectGUI::$refinery |
|
protected |
◆ $tpl
◆ $tree
ilTree ilMailSearchObjectGUI::$tree |
|
protected |
◆ $ui_factory
ILIAS UI Factory ilMailSearchObjectGUI::$ui_factory |
|
protected |
◆ $ui_renderer
ILIAS UI Renderer ilMailSearchObjectGUI::$ui_renderer |
|
protected |
◆ $umail
◆ $user
◆ $view
string ilMailSearchObjectGUI::$view = null |
|
protected |
The documentation for this class was generated from the following file: