BlockGUI class for Personal Desktop Mail block.
More...
◆ __construct()
ilPDMailBlockGUI::__construct |
( |
| ) |
|
Definition at line 42 of file class.ilPDMailBlockGUI.php.
References $DIC, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\Repository\ctrl(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), ILIAS\Repository\refinery(), ilBlockGUI\setLimit(), ilBlockGUI\setPresentation(), ilBlockGUI\setTitle(), and ILIAS\Repository\user().
45 $this->
lng = $DIC->language();
46 $this->
user = $DIC->user();
47 $this->
ctrl = $DIC->ctrl();
48 $this->setting = $DIC->settings();
49 $this->rbacsystem = $DIC->rbac()->system();
50 $this->
http = $DIC->http();
static http()
Fetches the global http state from ILIAS.
__construct(Container $dic, ilPlugin $plugin)
setTitle(string $a_title)
setPresentation(int $type)
◆ deleteMail()
ilPDMailBlockGUI::deleteMail |
( |
| ) |
|
Definition at line 217 of file class.ilPDMailBlockGUI.php.
References ILIAS\Repository\ctrl(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), ILIAS\Repository\refinery(), and ILIAS\Repository\user().
219 $this->
lng->loadLanguageModule(
'mail');
225 if ($this->
http->wrapper()->query()->has(
'mail_id')) {
226 $mailId = $this->
http->wrapper()->query()->retrieve(
'mail_id', $this->
refinery->kindlyTo()->int());
229 if ($this->
http->wrapper()->query()->has(
'mobj_id')) {
230 $mobjId = $this->
http->wrapper()->query()->retrieve(
'mobj_id', $this->
refinery->kindlyTo()->int());
234 $this->requestMailObjId = $mbox->getInboxFolder();
237 if ($umail->moveMailsToFolder(
239 $mbox->getTrashFolder()
241 $this->main_tpl->setOnScreenMessage(
'info', $this->
lng->txt(
'mail_moved_to_trash'),
true);
243 $this->main_tpl->setOnScreenMessage(
'info', $this->
lng->txt(
'mail_move_error'),
true);
245 $this->
ctrl->redirectByClass(ilDashboardGUI::class,
'show');
static http()
Fetches the global http state from ILIAS.
Mail Box class Base class for creating and handling mail boxes.
◆ executeCommand()
ilPDMailBlockGUI::executeCommand |
( |
| ) |
|
◆ fillDataSection()
ilPDMailBlockGUI::fillDataSection |
( |
| ) |
|
◆ fillRow()
ilPDMailBlockGUI::fillRow |
( |
array |
$a_set | ) |
|
Definition at line 132 of file class.ilPDMailBlockGUI.php.
References ilBlockGUI\$user, ANONYMOUS_USER_ID, ILIAS\Repository\ctrl(), ilDatePresentation\formatDate(), ilObject\getId(), ilUtil\getImagePath(), ilObjUser\getPersonalPicturePath(), ilObjUser\getPublicName(), ilMailUserCache\getUserObjectById(), IL_CAL_DATE, and ILIAS\Repository\lng().
136 $this->tpl->touchBlock(
'usr_image_space');
142 $this->tpl->setVariable(
144 trim(($a_set[
'import_name'] ??
'') .
' (' . $this->
lng->txt(
'user_deleted') .
')')
147 $this->tpl->setCurrentBlock(
'image_container');
148 $this->tpl->touchBlock(
'image_container');
149 $this->tpl->parseCurrentBlock();
151 $this->tpl->setVariable(
'PUBLIC_NAME_LONG', ilMail::_getIliasMailerName());
153 $this->tpl->setVariable(
'ALT_SENDER', htmlspecialchars(ilMail::_getIliasMailerName()));
156 $this->tpl->setVariable(
161 $this->tpl->setVariable(
163 htmlentities($a_set[
'm_subject'], ENT_NOQUOTES,
'UTF-8')
165 $this->
ctrl->setParameter($this,
'mobj_id', $this->inbox);
166 $this->
ctrl->setParameter($this,
'mail_id', $a_set[
'mail_id']);
167 $this->tpl->setVariable(
'NEW_MAIL_LINK_READ', $this->
ctrl->getLinkTarget($this,
'showMail'));
168 $this->
ctrl->clearParameters($this);
static getUserObjectById(int $usr_id)
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false)
getPublicName()
returns firstname lastname and login if profile is public, login otherwise
getPersonalPicturePath(string $a_size="small", bool $a_force_pic=false)
◆ getBlockType()
ilPDMailBlockGUI::getBlockType |
( |
| ) |
|
◆ getHTML()
ilPDMailBlockGUI::getHTML |
( |
| ) |
|
◆ getListItemForData()
ilPDMailBlockGUI::getListItemForData |
( |
array |
$data | ) |
|
|
protected |
Definition at line 267 of file class.ilPDMailBlockGUI.php.
References Vendor\Package\$f, ilBlockGUI\$user, ANONYMOUS_USER_ID, ILIAS\Repository\ctrl(), ilDatePresentation\formatDate(), ilObject\getId(), ilUtil\getImagePath(), ilObjUser\getPersonalPicturePath(), ilObjUser\getPublicName(), ilMailUserCache\getUserObjectById(), IL_CAL_DATE, ILIAS\Repository\lng(), and ILIAS\Repository\ui().
269 $f = $this->
ui->factory();
278 $public_name_long = trim((
$data[
'import_name'] ??
'') .
' (' . $this->
lng->txt(
'user_deleted') .
')');
282 $public_name_long = ilMail::_getIliasMailerName();
284 $alt_sender = htmlspecialchars(ilMail::_getIliasMailerName());
288 $new_mail_subj = htmlentities(
$data[
'm_subject'], ENT_NOQUOTES,
'UTF-8');
289 $this->
ctrl->setParameter($this,
'mobj_id', $this->inbox);
290 $this->
ctrl->setParameter($this,
'mail_id',
$data[
'mail_id']);
291 $new_mail_link = $this->
ctrl->getLinkTarget($this,
'showMail');
292 $this->
ctrl->clearParameters($this);
295 $button =
$f->button()->shy($new_mail_subj, $new_mail_link);
297 $item =
$f->item()->standard($button)->withDescription($new_mail_date);
298 if ($img_sender !==
"") {
299 $item = $item->withLeadImage(
$f->image()->standard($img_sender, $alt_sender));
static getUserObjectById(int $usr_id)
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false)
getPublicName()
returns firstname lastname and login if profile is public, login otherwise
Common interface to all items.
getPersonalPicturePath(string $a_size="small", bool $a_force_pic=false)
◆ getMails()
ilPDMailBlockGUI::getMails |
( |
| ) |
|
|
protected |
◆ getOverview()
ilPDMailBlockGUI::getOverview |
( |
| ) |
|
|
protected |
◆ getScreenMode()
static ilPDMailBlockGUI::getScreenMode |
( |
| ) |
|
|
static |
◆ isRepositoryObject()
ilPDMailBlockGUI::isRepositoryObject |
( |
| ) |
|
|
protected |
◆ preloadData()
ilPDMailBlockGUI::preloadData |
( |
array |
$data | ) |
|
|
protected |
◆ showMail()
ilPDMailBlockGUI::showMail |
( |
| ) |
|
|
protected |
Definition at line 176 of file class.ilPDMailBlockGUI.php.
References $requestMailObjId, ILIAS\Repository\ctrl(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), and ILIAS\Repository\refinery().
182 if ($this->
http->wrapper()->query()->has(
'mail_id')) {
183 $mailId = $this->
http->wrapper()->query()->retrieve(
'mail_id', $this->
refinery->kindlyTo()->int());
186 if ($this->
http->wrapper()->query()->has(
'mobj_id')) {
187 $mobjId = $this->
http->wrapper()->query()->retrieve(
'mobj_id', $this->
refinery->kindlyTo()->int());
189 $content_block->setContent($mail_gui->getPDMailHTML(
193 $content_block->setTitle($this->
lng->txt(
"message"));
195 $content_block->addBlockCommand(
196 "ilias.php?baseClass=ilMailGUI&mail_id=" .
197 $mailId .
"&mobj_id=" 198 . $mobjId .
"&type=reply",
199 $this->
lng->txt(
"reply")
201 $content_block->addBlockCommand(
202 "ilias.php?baseClass=ilMailGUI&mail_id=" .
203 $mailId .
"&mobj_id=" 204 . $mobjId .
"&type=read",
205 $this->
lng->txt(
"inbox")
208 $this->
ctrl->setParameter($this,
'mail_id', $mailId);
209 $content_block->addBlockCommand(
210 $this->
ctrl->getLinkTarget($this,
'deleteMail'),
211 $this->
lng->txt(
'delete')
214 return $content_block->getHTML();
Mail User Interface class.
static http()
Fetches the global http state from ILIAS.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ $block_type
string ilPDMailBlockGUI::$block_type = 'pdmail' |
|
static |
◆ $http
◆ $inbox
int ilPDMailBlockGUI::$inbox |
|
protected |
◆ $mails
array ilPDMailBlockGUI::$mails = [] |
|
protected |
◆ $new_rendering
bool ilPDMailBlockGUI::$new_rendering = true |
|
protected |
◆ $rbacsystem
◆ $refinery
Refinery ilPDMailBlockGUI::$refinery |
|
private |
◆ $requestMailObjId
int ilPDMailBlockGUI::$requestMailObjId = 0 |
|
private |
◆ $setting
The documentation for this class was generated from the following file: