18 declare(strict_types=1);
36 $this->
access = $DIC->access();
41 $this->
addColumn($this->
lng->txt(
'ecs_participants'),
'participants',
"35%");
42 $this->
addColumn($this->
lng->txt(
'ecs_participants_infos'),
'infos',
"35%");
43 $this->
addColumn($this->
lng->txt(
'ecs_tbl_export'),
'export',
'5%');
44 $this->
addColumn($this->
lng->txt(
'ecs_tbl_import'),
'import',
'5%');
45 $this->
addColumn($this->
lng->txt(
'ecs_tbl_import_type'),
'type',
'10%');
47 if ($this->
access->checkAccess(
'write',
'', (
int) $_REQUEST[
"ref_id"])) {
52 $this->
setRowTemplate(
"tpl.participant_row.html",
"Services/WebServices/ECS");
72 protected function fillRow(array $a_set): void
74 $this->tpl->setVariable(
'S_ID', $this->
getServer()->getServerId());
75 $this->tpl->setVariable(
'M_ID', $a_set[
'mid']);
76 $this->tpl->setVariable(
'VAL_ID', $this->
getServer()->getServerId() .
'_' . $a_set[
'mid']);
77 $this->tpl->setVariable(
'VAL_ORG', (
string) $a_set[
'org']);
78 $this->tpl->setVariable(
'VAL_TITLE', $a_set[
'participants']);
79 $this->tpl->setVariable(
'VAL_DESC', $a_set[
'description']);
80 $this->tpl->setVariable(
'VAL_EMAIL', $a_set[
'email']);
81 $this->tpl->setVariable(
'VAL_DNS', $a_set[
'dns']);
82 $this->tpl->setVariable(
'VAL_ABR', $a_set[
'abr']);
83 $this->tpl->setVariable(
'TXT_EMAIL', $this->
lng->txt(
'ecs_email'));
84 $this->tpl->setVariable(
'TXT_DNS', $this->
lng->txt(
'ecs_dns'));
85 $this->tpl->setVariable(
'TXT_ABR', $this->
lng->txt(
'ecs_abr'));
86 $this->tpl->setVariable(
'TXT_ID', $this->
lng->txt(
'ecs_unique_id'));
87 $this->tpl->setVariable(
'TXT_ORG', $this->
lng->txt(
'organization'));
92 if ($part->isExportEnabled()) {
93 foreach ($part->getExportTypes() as $obj_type) {
94 $this->tpl->setCurrentBlock(
'obj_erow');
95 $this->tpl->setVariable(
'TXT_OBJ_EINFO', $this->
lng->txt(
'objs_' . $obj_type));
96 $this->tpl->parseCurrentBlock();
99 $this->
lng->loadLanguageModule(
'administration');
100 $this->tpl->setVariable(
'TXT_OBJ_EINFO', $this->
lng->txt(
'disabled'));
103 if ($part->isImportEnabled()) {
104 foreach ($part->getImportTypes() as $obj_type) {
105 $this->tpl->setCurrentBlock(
'obj_irow');
106 $this->tpl->setVariable(
'TXT_OBJ_IINFO', $this->
lng->txt(
'objs_' . $obj_type));
107 $this->tpl->parseCurrentBlock();
110 $this->
lng->loadLanguageModule(
'administration');
111 $this->tpl->setVariable(
'TXT_OBJ_IINFO', $this->
lng->txt(
'disabled'));
115 $part->getImportType(),
116 'import_type[' . $this->
getServer()->getServerId() .
'][' . $a_set[
'mid'] .
']',
125 $this->tpl->setVariable(
'IMPORT_SEL', $sel);
128 $list->setItemLinkClass(
'small');
129 $list->setSelectionHeaderClass(
'small');
130 $list->setId(
'actl_' . $this->
getServer()->getServerId() .
'_' . $a_set[
'mid']);
131 $list->setListTitle($this->
lng->txt(
'actions'));
136 $this->
lng->txt(
'edit'),
138 $this->
ctrl->getLinkTargetByClass(
'ilecsparticipantsettingsgui',
'settings')
141 switch ($part->getImportType()) {
151 $this->
lng->txt(
'ecs_crs_alloc_set'),
153 $this->
ctrl->getLinkTargetByClass(
'ilecsmappingsettingsgui',
'cStart')
163 $this->
lng->txt(
'ecs_dir_alloc_set'),
165 $this->
ctrl->getLinkTargetByClass(
'ilecsmappingsettingsgui',
'dStart')
168 $this->
lng->txt(
'ecs_crs_alloc_set'),
170 $this->
ctrl->getLinkTargetByClass(
'ilecsmappingsettingsgui',
'cStart')
175 if ($this->
access->checkAccess(
'write',
'', (
int) $_REQUEST[
"ref_id"])) {
176 $this->tpl->setCurrentBlock(
"actions");
177 $this->tpl->setVariable(
'ACTIONS', $list->getHTML());
178 $this->tpl->parseCurrentBlock();
185 public function parse(array $participants): void
187 foreach ($participants as $participant) {
188 $tmp_arr[
'mid'] = $participant->getMID();
189 $tmp_arr[
'participants'] = $participant->getParticipantName();
190 $tmp_arr[
'description'] = $participant->getDescription();
191 $tmp_arr[
'email'] = $participant->getEmail();
192 $tmp_arr[
'dns'] = $participant->getDNS();
195 $tmp_arr[
'abr'] = $participant->getOrganisation()->getAbbreviation();
196 $tmp_arr[
'org'] = $participant->getOrganisation()->getName();
getServerId()
Get current server id.
setDefaultOrderField(string $a_defaultorderfield)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setDefaultOrderDirection(string $a_defaultorderdirection)
__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)
disable(string $a_module_name)