18 declare(strict_types=1);
37 $this->
access = $DIC->access();
38 $this->ui_factory = $DIC->ui()->factory();
39 $this->ui_renderer = $DIC->ui()->renderer();
44 $this->
addColumn($this->
lng->txt(
'ecs_participants'),
'participants',
"35%");
45 $this->
addColumn($this->
lng->txt(
'ecs_participants_infos'),
'infos',
"35%");
46 $this->
addColumn($this->
lng->txt(
'ecs_tbl_export'),
'export',
'5%');
47 $this->
addColumn($this->
lng->txt(
'ecs_tbl_import'),
'import',
'5%');
48 $this->
addColumn($this->
lng->txt(
'ecs_tbl_import_type'),
'type',
'10%');
50 if ($this->
access->checkAccess(
'write',
'', (
int) $_REQUEST[
"ref_id"])) {
55 $this->
setRowTemplate(
"tpl.participant_row.html",
"Services/WebServices/ECS");
75 protected function fillRow(array $a_set): void
77 $this->tpl->setVariable(
'S_ID', $this->
getServer()->getServerId());
78 $this->tpl->setVariable(
'M_ID', $a_set[
'mid']);
79 $this->tpl->setVariable(
'VAL_ID', $this->
getServer()->getServerId() .
'_' . $a_set[
'mid']);
80 $this->tpl->setVariable(
'VAL_ORG', (
string) $a_set[
'org']);
81 $this->tpl->setVariable(
'VAL_TITLE', $a_set[
'participants']);
82 $this->tpl->setVariable(
'VAL_DESC', $a_set[
'description']);
83 $this->tpl->setVariable(
'VAL_EMAIL', $a_set[
'email']);
84 $this->tpl->setVariable(
'VAL_DNS', $a_set[
'dns']);
85 $this->tpl->setVariable(
'VAL_ABR', $a_set[
'abr']);
86 $this->tpl->setVariable(
'TXT_EMAIL', $this->
lng->txt(
'ecs_email'));
87 $this->tpl->setVariable(
'TXT_DNS', $this->
lng->txt(
'ecs_dns'));
88 $this->tpl->setVariable(
'TXT_ABR', $this->
lng->txt(
'ecs_abr'));
89 $this->tpl->setVariable(
'TXT_ID', $this->
lng->txt(
'ecs_unique_id'));
90 $this->tpl->setVariable(
'TXT_ORG', $this->
lng->txt(
'organization'));
95 if ($part->isExportEnabled()) {
96 foreach ($part->getExportTypes() as $obj_type) {
97 $this->tpl->setCurrentBlock(
'obj_erow');
98 $this->tpl->setVariable(
'TXT_OBJ_EINFO', $this->
lng->txt(
'objs_' . $obj_type));
99 $this->tpl->parseCurrentBlock();
102 $this->
lng->loadLanguageModule(
'administration');
103 $this->tpl->setVariable(
'TXT_OBJ_EINFO', $this->
lng->txt(
'disabled'));
106 if ($part->isImportEnabled()) {
107 foreach ($part->getImportTypes() as $obj_type) {
108 $this->tpl->setCurrentBlock(
'obj_irow');
109 $this->tpl->setVariable(
'TXT_OBJ_IINFO', $this->
lng->txt(
'objs_' . $obj_type));
110 $this->tpl->parseCurrentBlock();
113 $this->
lng->loadLanguageModule(
'administration');
114 $this->tpl->setVariable(
'TXT_OBJ_IINFO', $this->
lng->txt(
'disabled'));
118 $part->getImportType(),
119 'import_type[' . $this->
getServer()->getServerId() .
'][' . $a_set[
'mid'] .
']',
128 $this->tpl->setVariable(
'IMPORT_SEL', $sel);
133 $items[] = [ $this->
lng->txt(
'edit'),
134 $this->
ctrl->getLinkTargetByClass(
'ilecsparticipantsettingsgui',
'settings')
137 switch ($part->getImportType()) {
147 $this->
lng->txt(
'ecs_crs_alloc_set'),
148 $this->
ctrl->getLinkTargetByClass(
'ilecsmappingsettingsgui',
'cStart')
158 $this->
lng->txt(
'ecs_dir_alloc_set'),
159 $this->
ctrl->getLinkTargetByClass(
'ilecsmappingsettingsgui',
'dStart')
162 $this->
lng->txt(
'ecs_crs_alloc_set'),
163 $this->
ctrl->getLinkTargetByClass(
'ilecsmappingsettingsgui',
'cStart')
168 if ($this->
access->checkAccess(
'write',
'', (
int) $_REQUEST[
"ref_id"])) {
169 $this->tpl->setCurrentBlock(
"actions");
171 foreach ($items as $item) {
172 $render_items[] = $this->ui_factory->button()->shy(...$item);
174 $this->tpl->setVariable(
'ACTIONS', $this->ui_renderer->render($this->ui_factory->dropdown()->standard($render_items)->withLabel($this->
lng->txt(
'actions'))));
175 $this->tpl->parseCurrentBlock();
182 public function parse(array $participants): void
184 foreach ($participants as $participant) {
185 $tmp_arr[
'mid'] = $participant->getMID();
186 $tmp_arr[
'participants'] = $participant->getParticipantName();
187 $tmp_arr[
'description'] = $participant->getDescription();
188 $tmp_arr[
'email'] = $participant->getEmail();
189 $tmp_arr[
'dns'] = $participant->getDNS();
192 $tmp_arr[
'abr'] = $participant->getOrganisation()->getAbbreviation();
193 $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)
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)