19 declare(strict_types=1);
38 $this->
lng = $DIC[
'lng'];
39 $this->
ctrl = $DIC[
'ilCtrl'];
40 $this->
user = $DIC[
'ilUser'];
41 $this->rbacsystem = $DIC[
'rbacsystem'];
43 $this->
lng->loadLanguageModule(
'crs');
44 $this->
lng->loadLanguageModule(
'buddysystem');
48 $this->mailing_allowed = $this->rbacsystem->checkAccess(
'internal_mail', $mail->getMailObjectReferenceId());
52 if (
$type ===
'crs') {
53 $mode[
'short'] =
'crs';
54 $mode[
'long'] =
'course';
55 $mode[
'checkbox'] =
'search_crs';
56 $mode[
'tableprefix'] =
'crstable';
57 $mode[
'lng_mail'] = $this->
lng->txt(
'mail_my_courses');
58 $mode[
'view'] =
'myobjects';
60 } elseif (
$type ===
'grp') {
61 $mode[
'short'] =
'grp';
62 $mode[
'long'] =
'group';
63 $mode[
'checkbox'] =
'search_grp';
64 $mode[
'tableprefix'] =
'grptable';
65 $mode[
'lng_mail'] = $this->
lng->txt(
'mail_my_groups');
66 $mode[
'view'] =
'myobjects';
70 $this->
setId(
'search_' . $mode[
'short']);
73 $this->parentObject = $a_parent_obj;
77 $this->
ctrl->setParameter($a_parent_obj,
'view', $mode[
'view']);
84 $http->wrapper()->query()->has(
'ref') &&
85 $http->wrapper()->query()->retrieve(
'ref',
$refinery->kindlyTo()->string()) !==
'' 87 $this->
ctrl->setParameter(
90 $http->wrapper()->query()->retrieve(
'ref',
$refinery->kindlyTo()->string())
94 if (
$http->wrapper()->post()->has($mode[
'checkbox'])) {
95 $ids =
$http->wrapper()->post()->retrieve(
106 $this->
ctrl->setParameter(
115 $this->
ctrl->clearParameters($a_parent_obj);
118 $this->
setRowTemplate(
'tpl.mail_search_objects_row.html',
'Services/Contact');
123 $this->
addColumn($mode[
"lng_mail"],
'OBJECT_NAME',
'30%');
124 $this->
addColumn($this->
lng->txt(
'path'),
'OBJECT_PATH',
'30%');
125 $this->
addColumn($this->
lng->txt(
'obj_count_members'),
'OBJECT_NO_MEMBERS',
'20%');
126 $this->
addColumn($this->
lng->txt(
'actions'),
'',
'19%');
129 if ($this->mailing_allowed) {
133 $this->
lng->loadLanguageModule(
"wsp");
139 $http->wrapper()->query()->has(
'ref') &&
140 $http->wrapper()->query()->retrieve(
'ref',
$refinery->to()->string()) ===
'mail' 146 protected function fillRow(array $a_set): void
148 if ($a_set[
'hidden_members']) {
149 $this->tpl->setCurrentBlock(
'caption_asterisk');
150 $this->tpl->touchBlock(
'caption_asterisk');
151 $this->tpl->parseCurrentBlock();
153 foreach ($a_set as
$key => $value) {
154 $this->tpl->setVariable(strtoupper(
$key), $value);
156 $this->tpl->setVariable(
'SHORT', $this->mode[
"short"]);
161 return $a_field ===
'OBJECT_NO_MEMBERS';
setFormAction(string $a_form_action, bool $a_multipart=false)
addCommandButton(string $a_cmd, string $a_text, string $a_onclick='', string $a_id="", string $a_class="")
setSelectAllCheckbox(string $a_select_all_checkbox, bool $a_select_all_on_top=false)
numericOrdering(string $a_field)
__construct(object $a_parent_obj, string $type='crs', string $context='mail')
setShowRowsSelector(bool $a_value)
Toggle rows-per-page selector.
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setTitle(string $a_title, string $a_icon="", string $a_icon_alt="")
__construct(Container $dic, ilPlugin $plugin)
addColumn(string $a_text, string $a_sort_field="", string $a_width="", bool $a_is_checkbox_action_column=false, string $a_class="", string $a_tooltip="", bool $a_tooltip_with_html=false)
addMultiCommand(string $a_cmd, string $a_text)
Refinery Factory $refinery