ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.ilSurveySavePhraseTableGUI.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2019 ILIAS open source, Extended GPL, see docs/LICENSE */
4
10{
11 protected $confirmdelete;
12
20 public function __construct($a_parent_obj, $a_parent_cmd)
21 {
22 global $DIC;
23
24 parent::__construct($a_parent_obj, $a_parent_cmd);
25
26 $lng = $DIC->language();
27 $ilCtrl = $DIC->ctrl();
28
29 $this->lng = $lng;
30 $this->ctrl = $ilCtrl;
31 $this->confirmdelete = $confirmdelete;
32
33 $this->setFormName('phrases');
34 $this->setStyle('table', 'fullwidth');
35
36 $this->addColumn($this->lng->txt("answer"), '', '');
37 $this->addColumn($this->lng->txt("use_other_answer"), '', '');
38 $this->addColumn($this->lng->txt("scale"), '', '');
39
40 $this->setRowTemplate("tpl.il_svy_qpl_phrase_save_row.html", "Modules/SurveyQuestionPool");
41
42 $this->setFormAction($this->ctrl->getFormAction($a_parent_obj, $a_parent_cmd));
43 $this->disable('sort');
44 $this->disable('select_all');
45 $this->enable('header');
46 }
47
55 public function fillRow($data)
56 {
57 $this->tpl->setVariable("ANSWER", $data["answer"]);
58 $this->tpl->setVariable("OPEN_ANSWER", ($data["other"]) ? $this->lng->txt('yes') : $this->lng->txt('no'));
59 $this->tpl->setVariable("SCALE", $data["scale"]);
60 }
61}
An exception for terminatinating execution or to throw for unit testing.
__construct($a_parent_obj, $a_parent_cmd)
Constructor.
Class ilTable2GUI.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
addColumn( $a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
Add a column to the header.
setFormName($a_formname="")
Set Form name.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
disable($a_module_name)
diesables particular modules of table
setStyle($a_element, $a_style)
enable($a_module_name)
enables particular modules of table
global $ilCtrl
Definition: ilias.php:18
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
$DIC
Definition: xapitoken.php:46