ILIAS  release_7 Revision v7.30-3-g800a261c036
class.SurveyMaterialsSourceTableGUI.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
11{
12 public function __construct($a_parent_obj, $a_parent_cmd, $a_cancel_cmd)
13 {
14 global $DIC;
15
16 $this->ctrl = $DIC->ctrl();
17 $this->lng = $DIC->language();
18 $ilCtrl = $DIC->ctrl();
19 $lng = $DIC->language();
20
21 parent::__construct($a_parent_obj, $a_parent_cmd);
22
23 $this->addColumn($lng->txt("title"), "title");
24 $this->addColumn($lng->txt("action"), "");
25 $this->setTitle($this->lng->txt('select_object_to_link'));
26
27 $this->setLimit(9999);
28 $this->disable("numinfo");
29
30 $this->setRowTemplate("tpl.il_svy_qpl_material_source_row.html", "Modules/SurveyQuestionPool");
31
32 $this->setFormAction($ilCtrl->getFormAction($this->getParentObject(), $this->getParentCmd()));
33 $this->addCommandButton($a_cancel_cmd, $this->lng->txt('cancel'));
34
35 $this->setDefaultOrderField("title");
36 $this->setDefaultOrderDirection("asc");
37 }
38
42 protected function fillRow($data)
43 {
44 $ilCtrl = $this->ctrl;
46
47 $url_cmd = "add" . strtoupper($data["item_type"]);
48 $url_type = strtolower($data["item_type"]);
49
50 $ilCtrl->setParameter($this->getParentObject(), $url_type, $data["item_id"]);
51 $url = $ilCtrl->getLinkTarget($this->getParentObject(), $url_cmd) .
52 $ilCtrl->setParameter($this->getParentObject(), $url_type, "");
53
54 $this->tpl->setVariable("TITLE", $data['title']);
55 $this->tpl->setVariable("URL_ADD", $url);
56 $this->tpl->setVariable("TXT_ADD", $lng->txt("add"));
57 }
58}
An exception for terminatinating execution or to throw for unit testing.
TableGUI class for survey question source materials.
__construct($a_parent_obj, $a_parent_cmd, $a_cancel_cmd)
ilTable2GUI constructor.
Class ilTable2GUI.
getParentObject()
Get parent object.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
setLimit($a_limit=0, $a_default_limit=0)
set max.
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
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.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
disable($a_module_name)
diesables particular modules of table
global $DIC
Definition: goto.php:24
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
$url