4include_once(
'./Services/Table/classes/class.ilTable2GUI.php');
 
   20    public function __construct($a_parent_obj, $a_parent_cmd, $a_content_obj)
 
   25        $ilCtrl = 
$DIC[
'ilCtrl'];
 
   28        $this->ctrl = $ilCtrl;
 
   30        $this->logger = 
$DIC->logger()->ac();
 
   35        $this->lng->loadLanguageModule(
$type);
 
   38        $this->
addColumn($this->lng->txt(
'title'), 
'title');
 
   39        $this->
addColumn($this->lng->txt(
'description'), 
'description');
 
   40        $this->
addColumn($this->lng->txt(
'unambiguousness'), 
'unique');
 
   41        $this->
addColumn($this->lng->txt(
'groupings_assigned_obj_' . 
$type), 
'assigned');
 
   45        $this->
setTitle($this->lng->txt(
'groupings'));
 
   51        $this->
setFormAction($this->ctrl->getFormAction($a_parent_obj));
 
   64        foreach ($items as $grouping_id) {
 
   67            $data[$grouping_id][
'id'] = $grouping_id;
 
   68            $data[$grouping_id][
'source_ref_id'] = $tmp_obj->getContainerRefId();
 
   69            $data[$grouping_id][
'assigned'] = [];
 
   70            $data[$grouping_id][
'title'] = $tmp_obj->getTitle();
 
   71            $data[$grouping_id][
'unique'] = $this->lng->txt($tmp_obj->getUniqueField());
 
   74            if (strlen($tmp_obj->getDescription())) {
 
   75                $data[$grouping_id][
'description'] = $tmp_obj->getDescription();
 
   79            $assigned_items = $tmp_obj->getAssignedItems();
 
   80            foreach ($assigned_items as $condition) {
 
   90        if (is_array($a_set[
"assigned"]) && count($a_set[
"assigned"]) > 0) {
 
   91            foreach ($a_set[
"assigned"] as $item) {
 
   92                $this->tpl->setCurrentBlock(
"assigned");
 
   93                $this->tpl->setVariable(
"ITEM_TITLE", $item);
 
   94                $this->tpl->parseCurrentBlock();
 
   97            $this->tpl->setCurrentBlock(
"assigned");
 
   98            $this->tpl->setVariable(
"ITEM_TITLE", $this->lng->txt(
'crs_grp_no_courses_assigned'));
 
   99            $this->tpl->parseCurrentBlock();
 
  102        if (array_key_exists(
'source_ref_id', $a_set) && $a_set[
'source_ref_id']) {
 
  103            $path = new \ilPathGUI();
 
  104            $path->enableHideLeaf(
false);
 
  105            $path->enableTextOnly(
false);
 
  106            $path->setUseImages(
true);
 
  108            $this->tpl->setCurrentBlock(
'path');
 
  109            $this->tpl->setVariable(
'OBJ_PATH', $path->getPath(
ROOT_FOLDER_ID, $a_set[
'source_ref_id']));
 
  110            $this->tpl->parseCurrentBlock();
 
  113        $this->tpl->setVariable(
"ID", $a_set[
"id"]);
 
  114        $this->tpl->setVariable(
"TXT_TITLE", $a_set[
"title"]);
 
  115        $this->tpl->setVariable(
"TXT_DESCRIPTION", $a_set[
"description"]);
 
  116        $this->tpl->setVariable(
"TXT_UNIQUE", $a_set[
"unique"]);
 
  118        $this->ctrl->setParameter($this->parent_obj, 
'obj_id', $a_set[
"id"]);
 
  119        $this->tpl->setVariable(
 
  121            $this->ctrl->getLinkTarget($this->parent_obj, 
'edit')
 
  123        $this->tpl->setVariable(
'TXT_EDIT', $this->lng->txt(
'edit'));
 
An exception for terminatinating execution or to throw for unit testing.
fillRow($a_set)
Standard Version of Fill Row.
__construct($a_parent_obj, $a_parent_cmd, $a_content_obj)
ilTable2GUI constructor.
static _getVisibleGroupings($a_obj_id)
static _lookupTitle($a_id)
lookup object title
static _lookupType($a_id, $a_reference=false)
lookup object type
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
setSelectAllCheckbox($a_select_all_checkbox, $a_select_all_on_top=false)
Set the name of the checkbox that should be toggled with a select all button.
setData($a_data)
set table data @access public
setRowTemplate($a_template, $a_template_dir="")
Set row template.
addMultiCommand($a_cmd, $a_text)
Add Command button.
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.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc