19 declare(strict_types=1);
36 $this->
lng = $DIC[
'lng'];
37 $this->
ctrl = $DIC[
'ilCtrl'];
38 $this->
user = $DIC[
'ilUser'];
39 $this->rbacsystem = $DIC[
'rbacsystem'];
41 $this->
lng->loadLanguageModule(
'crs');
42 $this->
lng->loadLanguageModule(
'buddysystem');
46 $this->mailing_allowed = $this->rbacsystem->checkAccess(
'internal_mail', $mail->getMailObjectReferenceId());
50 if ($type ===
'crs') {
51 $mode[
'short'] =
'crs';
52 $mode[
'long'] =
'course';
53 $mode[
'checkbox'] =
'search_crs';
54 $mode[
'tableprefix'] =
'crstable';
55 $mode[
'lng_mail'] = $this->
lng->txt(
'mail_my_courses');
56 $mode[
'view'] =
'myobjects';
58 } elseif ($type ===
'grp') {
59 $mode[
'short'] =
'grp';
60 $mode[
'long'] =
'group';
61 $mode[
'checkbox'] =
'search_grp';
62 $mode[
'tableprefix'] =
'grptable';
63 $mode[
'lng_mail'] = $this->
lng->txt(
'mail_my_groups');
64 $mode[
'view'] =
'myobjects';
68 $this->
setId(
'search_' . $mode[
'short']);
71 $this->parentObject = $a_parent_obj;
75 $this->
ctrl->setParameter($a_parent_obj,
'view', $mode[
'view']);
82 $http->wrapper()->query()->has(
'ref') &&
83 $http->wrapper()->query()->retrieve(
'ref',
$refinery->kindlyTo()->string()) !==
'' 85 $this->
ctrl->setParameter(
88 $http->wrapper()->query()->retrieve(
'ref',
$refinery->kindlyTo()->string())
92 if (
$http->wrapper()->post()->has($mode[
'checkbox'])) {
93 $ids =
$http->wrapper()->post()->retrieve(
104 $this->
ctrl->setParameter(
113 $this->
ctrl->clearParameters($a_parent_obj);
116 $this->
setRowTemplate(
'tpl.mail_search_objects_row.html',
'components/ILIAS/Contact');
121 $this->
addColumn($mode[
"lng_mail"],
'OBJECT_NAME',
'30%');
122 $this->
addColumn($this->
lng->txt(
'path'),
'OBJECT_PATH',
'30%');
123 $this->
addColumn($this->
lng->txt(
'obj_count_members'),
'OBJECT_NO_MEMBERS',
'20%');
124 $this->
addColumn($this->
lng->txt(
'actions'),
'',
'19%');
127 if ($this->mailing_allowed) {
131 $this->
lng->loadLanguageModule(
"wsp");
137 $http->wrapper()->query()->has(
'ref') &&
138 $http->wrapper()->query()->retrieve(
'ref',
$refinery->to()->string()) ===
'mail' 144 protected function fillRow(array $a_set): void
146 if ($a_set[
'hidden_members']) {
147 $this->tpl->setCurrentBlock(
'caption_asterisk');
148 $this->tpl->touchBlock(
'caption_asterisk');
149 $this->tpl->parseCurrentBlock();
151 foreach ($a_set as $key => $value) {
152 $this->tpl->setVariable(strtoupper($key), $value);
154 $this->tpl->setVariable(
'SHORT', $this->mode[
"short"]);
159 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)
setShowRowsSelector(bool $a_value)
Toggle rows-per-page selector.
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
__construct($a_parent_obj, string $type='crs', string $context='mail')
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)