ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilSurveyCodesEditTableGUI.php
Go to the documentation of this file.
1<?php
2
23{
24 public function __construct(
25 object $a_parent_obj,
26 string $a_parent_cmd
27 ) {
28 global $DIC;
29
30 $lng = $DIC->language();
31 $ilCtrl = $DIC->ctrl();
32
33 parent::__construct($a_parent_obj, $a_parent_cmd);
34
35 $this->lng = $lng;
36 $this->ctrl = $ilCtrl;
37
38 $this->addColumn($this->lng->txt("survey_code"), 'code', '');
39 $this->addColumn($this->lng->txt("email"), 'email', '');
40 $this->addColumn($this->lng->txt("lastname"), 'last_name', '');
41 $this->addColumn($this->lng->txt("firstname"), 'first_name', '');
42 $this->addColumn($this->lng->txt("mail_sent_short"), 'sent', '');
43
44 $this->setRowTemplate("tpl.il_svy_svy_codes_edit_row.html", "components/ILIAS/Survey");
45
46 $this->addCommandButton('updateCodes', $this->lng->txt('save'));
47 $this->addCommandButton('codes', $this->lng->txt('cancel'));
48
49 $this->setFormAction($this->ctrl->getFormAction($a_parent_obj, $a_parent_cmd));
50
51 $this->setDefaultOrderField("code");
52 $this->setDefaultOrderDirection("asc");
53 }
54
55 protected function fillRow(array $a_set): void
56 {
57 $this->tpl->setVariable('ID', $a_set["id"]);
58 $this->tpl->setVariable("SENT", ($a_set['sent']) ? ' checked="checked"' : '');
59 $this->tpl->setVariable("CODE", $a_set['code']);
60 $this->tpl->setVariable("EMAIL", $a_set['email']);
61 $this->tpl->setVariable("LAST_NAME", $a_set['last_name']);
62 $this->tpl->setVariable("FIRST_NAME", $a_set['first_name']);
63 }
64}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(object $a_parent_obj, string $a_parent_cmd)
fillRow(array $a_set)
Standard Version of Fill Row.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
addCommandButton(string $a_cmd, string $a_text, string $a_onclick='', string $a_id="", string $a_class="")
setFormAction(string $a_form_action, bool $a_multipart=false)
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)
setDefaultOrderField(string $a_defaultorderfield)
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template.
setDefaultOrderDirection(string $a_defaultorderdirection)
ilLanguage $lng
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26