14 include_once(
'Services/Table/classes/class.ilTable2GUI.php');
29 public function __construct($a_parent_obj, $a_parent_cmd =
'')
37 $this->
setId(
'shop_topics_tbl');
39 $this->
addColumn($this->lng->txt(
'title'),
'title' ,
'40%');
40 $this->
addColumn($this->lng->txt(
'date'),
'date' ,
'22%');
41 $this->
addColumn($this->lng->txt(
'pay_sorting_value'),
'sorting' ,
'22%');
44 $this->
setFormAction($this->ctrl->getFormAction($a_parent_obj));
45 $this->
setRowTemplate(
'tpl.shop_topics_list_row.html',
'Services/Payment');
59 $this->tpl->setVariable(
'VAL_ID', $a_set[
'id']);
60 $this->tpl->setVariable(
'VAL_TITLE', $a_set[
'title']);
61 $this->tpl->setVariable(
'VAL_DATE',
ilFormat::formatDate(date(
'Y-m-d H:i:s', $a_set[
'date']),
'datetime',
true));
62 $this->tpl->setVariable(
'VAL_SORTING_TEXTINPUT',
ilUtil::formInput(
'sorting['.$a_set[
'id'].
']', $a_set[
'sorting']));
64 $this->ctrl->setParameter($this->parent_obj,
'topic_id', $a_set[
'id']);
65 $this->tpl->setVariable(
'EDIT_LINK', $this->ctrl->getLinkTarget($this->parent_obj,
'showTopicForm'));
66 $this->tpl->setVariable(
'TXT_EDIT_RECORD', $this->lng->txt(
'edit'));
78 foreach($a_topics as $topic)
80 $tmp_arr[
'id'] = $topic->getId();
81 $tmp_arr[
'title'] = $topic->getTitle();
82 $tmp_arr[
'date'] = $topic->getCreateDate();
83 $tmp_arr[
'sorting'] = (int)$topic->getSorting();
85 $records_arr[] = $tmp_arr;
88 if (!count($a_topics))
97 $this->
addMultiCommand(
'confirmDeleteTopic', $this->lng->txt(
'delete'));
101 $this->
setData($records_arr ? $records_arr : array());