ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilDclTable Class Reference
+ Collaboration diagram for ilDclTable:

Public Member Functions

 __construct (int $a_id=0)
 
 doRead ()
 Read table. More...
 
 doDelete (bool $delete_only_content=false, bool $omit_notification=false)
 Delete table Attention this does not delete the maintable of it's the maintable of the collection. More...
 
 doCreate (bool $create_tablefield_setting=true, bool $create_standardview=true)
 
 doUpdate ()
 
 setId (int $a_id)
 Set table id. More...
 
 getId ()
 Get table id. More...
 
 setObjId (int $a_id)
 
 getObjId ()
 
 setTitle (string $a_title)
 
 getTitle ()
 
 getCollectionObject ()
 
 getRecords ()
 
 loadRecords ()
 
 deleteField (int $field_id)
 
 getField (string $field_id)
 
 getFieldIds ()
 
 getCustomFields ()
 
 getNewFieldOrder ()
 getNewOrder More...
 
 getNewTableviewOrder ()
 
 sortTableViews (array $tableviews=null)
 
 getFields ()
 Returns all fields of this table including the standard fields. More...
 
 reloadFields ()
 
 getTableViews ()
 
 getVisibleTableViews (int $user_id=0, bool $with_active_detailedview=false)
 
 getFirstTableViewId (int $user_id=0, bool $with_detailed_view=false)
 
 getFieldsForFormula ()
 Returns all fields of this table including the standard fields, wich are supported for formulas. More...
 
 getRecordFields ()
 Returns all fields of this table which are NOT standard fields. More...
 
 getEditableFields (bool $creation_mode)
 
 getExportableFields ()
 Return all the fields that are marked as exportable. More...
 
 hasPermissionToEditRecord (int $ref_id, ilDclBaseRecordModel $record)
 
 hasPermissionToDeleteRecord (int $ref_id, ilDclBaseRecordModel $record)
 
 hasPermissionToDeleteRecords (int $ref_id)
 
 hasPermissionToViewRecord (int $ref_id, ilDclBaseRecordModel $record, int $user_id=0)
 
 checkLimit ()
 
 updateFields ()
 Update fields. More...
 
 sortFields (array &$fields)
 sortFields More...
 
 buildOrderFields ()
 buildOrderFields orders the fields. More...
 
 getFieldByTitle (string $title)
 Get a field by title. More...
 
 setAddPerm (bool $add_perm)
 
 getAddPerm ()
 
 setDeletePerm (bool $delete_perm)
 
 getDeletePerm ()
 
 setEditByOwner (bool $edit_by_owner)
 
 getEditByOwner ()
 
 getDeleteByOwner ()
 
 setDeleteByOwner (bool $delete_by_owner)
 
 setEditPerm (bool $edit_perm)
 
 getEditPerm ()
 
 setLimited (bool $limited)
 
 getLimited ()
 
 setLimitEnd (string $limit_end)
 
 getLimitEnd ()
 
 setLimitStart (string $limit_start)
 
 getLimitStart ()
 
 setIsVisible (bool $is_visible)
 
 getIsVisible ()
 
 setDescription (string $description)
 
 getDescription ()
 
 setDefaultSortField (string $default_sort_field)
 
 getDefaultSortField ()
 
 setDefaultSortFieldOrder (string $default_sort_field_order)
 
 getDefaultSortFieldOrder ()
 
 setPublicCommentsEnabled (bool $public_comments)
 
 getPublicCommentsEnabled ()
 
 setViewOwnRecordsPerm (bool $view_own_perm)
 
 getViewOwnRecordsPerm ()
 
 getSaveConfirmation ()
 
 setSaveConfirmation (bool $save_confirmation)
 
 hasCustomFields ()
 
 compareOrder (ilDclBaseFieldModel $a, ilDclBaseFieldModel $b)
 
 cloneStructure (ilDclTable $original)
 
 afterClone ()
 
 _hasRecords ()
 _hasRecords More...
 
 addField (ilDclBaseFieldModel $field)
 
 setExportEnabled (bool $export_enabled)
 
 getExportEnabled ()
 
 getOrder ()
 
 updateOrder ()
 
 setOrder (int $table_order)
 
 setImportEnabled (bool $import_enabled)
 
 getImportEnabled ()
 
 getPartialRecords (string $ref_id, string $sort, string $direction, ?int $limit, int $offset, array $filter=[])
 Return only the needed subset of record objects for the table, according to sorting, paging and filters. More...
 
 showInvalidFields (bool $value)
 

Static Public Member Functions

static _tableExists (int $table_id)
 
static _getTableIdByTitle (string $title, int $obj_id)
 
static _hasFieldByTitle (string $title, int $obj_id)
 Checks if a table has a field with the given title. More...
 

Protected Member Functions

 loadObj ()
 
 loadCustomFields ()
 
 doesRecordBelongToUser (ilDclBaseRecordModel $record)
 
 sortByOrder (array &$array)
 

Protected Attributes

int $id = 0
 
int $objId = null
 
ilObjDataCollection $obj = null
 
string $title = ""
 
array $fields = []
 
array $stdFields = []
 
array $records = []
 
bool $is_visible = false
 
bool $add_perm = false
 
bool $edit_perm = false
 
bool $delete_perm = false
 
bool $edit_by_owner = false
 
bool $delete_by_owner = false
 
bool $save_confirmation = false
 
bool $limited = false
 
string $limit_start = ""
 
string $limit_end = ""
 
bool $export_enabled = false
 
int $table_order = 0
 
bool $import_enabled = false
 
string $default_sort_field = "0"
 
string $default_sort_field_order = 'asc'
 Default sort-order (asc|desc) More...
 
string $description = ''
 Description for this table displayed above records. More...
 
bool $public_comments = false
 True if users can add comments on each record of this table. More...
 
int $view_own_records_perm = 0
 True if user can only view his/her own entries in the table. More...
 
array $all_fields = null
 table fields and std fields combined More...
 
ILIAS HTTP Services $http
 
ILIAS Refinery Factory $refinery
 
ilObjUser $user
 
ilDBInterface $db
 
bool $show_invalid = false
 

Detailed Description

Definition at line 25 of file class.ilDclTable.php.

Constructor & Destructor Documentation

◆ __construct()

ilDclTable::__construct ( int  $a_id = 0)

Definition at line 84 of file class.ilDclTable.php.

References $DIC, doRead(), ILIAS\FileDelivery\http(), ILIAS\Repository\refinery(), and ILIAS\Repository\user().

85  {
86  global $DIC;
87 
88  $this->http = $DIC->http();
89  $this->refinery = $DIC->refinery();
90  $this->db = $DIC->database();
91  $this->user = $DIC->user();
92 
93  if ($a_id != 0) {
94  $this->id = $a_id;
95  $this->doRead();
96  }
97  }
doRead()
Read table.
global $DIC
Definition: feed.php:28
static http()
Fetches the global http state from ILIAS.
+ Here is the call graph for this function:

Member Function Documentation

◆ _getTableIdByTitle()

static ilDclTable::_getTableIdByTitle ( string  $title,
int  $obj_id 
)
static
Parameters
int$obj_idDatacollection object ID where the table belongs to

Definition at line 1115 of file class.ilDclTable.php.

References $DIC, $id, and $ilDB.

1115  : int
1116  {
1117  global $DIC;
1118  $ilDB = $DIC['ilDB'];
1119 
1120  $result = $ilDB->query(
1121  'SELECT id FROM il_dcl_table WHERE title = ' . $ilDB->quote($title, 'text') . ' AND obj_id = '
1122  . $ilDB->quote($obj_id, 'integer')
1123  );
1124  $id = 0;
1125  while ($rec = $ilDB->fetchAssoc($result)) {
1126  $id = $rec['id'];
1127  }
1128 
1129  return $id;
1130  }
global $DIC
Definition: feed.php:28

◆ _hasFieldByTitle()

static ilDclTable::_hasFieldByTitle ( string  $title,
int  $obj_id 
)
static

Checks if a table has a field with the given title.

Parameters
string$titleTitle of field
int$obj_idof the table

Definition at line 1184 of file class.ilDclTable.php.

References $DIC, and $ilDB.

Referenced by ilDclFieldEditGUI\checkInput().

1184  : bool
1185  {
1186  global $DIC;
1187  $ilDB = $DIC['ilDB'];
1188  $result = $ilDB->query(
1189  'SELECT * FROM il_dcl_field WHERE table_id = ' . $ilDB->quote($obj_id, 'integer') . ' AND title = '
1190  . $ilDB->quote($title, 'text')
1191  );
1192 
1193  return (bool) $ilDB->numRows($result);
1194  }
global $DIC
Definition: feed.php:28
+ Here is the caller graph for this function:

◆ _hasRecords()

ilDclTable::_hasRecords ( )

_hasRecords

Definition at line 1085 of file class.ilDclTable.php.

References getRecords().

1085  : bool
1086  {
1087  return count($this->getRecords()) > 0;
1088  }
+ Here is the call graph for this function:

◆ _tableExists()

static ilDclTable::_tableExists ( int  $table_id)
static
Returns
bool returns true if there exists a table with id $table_id

Definition at line 1101 of file class.ilDclTable.php.

References $DIC, and $ilDB.

Referenced by ilDclBaseRecordModel\doCreate(), and ilDclBaseFieldModel\doCreate().

1101  : bool
1102  {
1103  global $DIC;
1104  $ilDB = $DIC['ilDB'];
1105 
1106  $query = "SELECT * FROM il_dcl_table WHERE id = " . $table_id;
1107  $result = $ilDB->query($query);
1108 
1109  return $result->numRows() != 0;
1110  }
global $DIC
Definition: feed.php:28
+ Here is the caller graph for this function:

◆ addField()

ilDclTable::addField ( ilDclBaseFieldModel  $field)
Parameters
ilDclBaseFieldModel$fieldadd an already created field for eg. ordering.

Definition at line 1093 of file class.ilDclTable.php.

References ilDclBaseFieldModel\getId().

1093  : void
1094  {
1095  $this->all_fields[$field->getId()] = $field;
1096  }
+ Here is the call graph for this function:

◆ afterClone()

ilDclTable::afterClone ( )

Definition at line 1075 of file class.ilDclTable.php.

References getFields(), and getRecords().

1075  : void
1076  {
1077  foreach ($this->getFields() as $field) {
1078  $field->afterClone($this->getRecords());
1079  }
1080  }
getFields()
Returns all fields of this table including the standard fields.
+ Here is the call graph for this function:

◆ buildOrderFields()

ilDclTable::buildOrderFields ( )

buildOrderFields orders the fields.

Definition at line 785 of file class.ilDclTable.php.

References getFields(), and sortByOrder().

Referenced by doCreate().

785  : void
786  {
787  $fields = $this->getFields();
788  $this->sortByOrder($fields);
789  $count = 10;
790  $offset = 10;
791  foreach ($fields as $field) {
792  if (!is_null($field->getOrder())) {
793  $field->setOrder($count);
794  $count = $count + $offset;
795  $field->doUpdate();
796  }
797  }
798  }
sortByOrder(array &$array)
getFields()
Returns all fields of this table including the standard fields.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkLimit()

ilDclTable::checkLimit ( )

Definition at line 712 of file class.ilDclTable.php.

References getLimited(), getLimitEnd(), getLimitStart(), and IL_CAL_DATE.

Referenced by hasPermissionToDeleteRecord(), and hasPermissionToEditRecord().

712  : bool
713  {
714  if ($this->getLimited()) {
715  $from = null;
716  $to = null;
717  $now = new ilDateTime(date("Y-m-d H:i:s"), IL_CAL_DATE);
718 
719  if ($this->getLimitStart() != "") {
720  $from = new ilDateTime($this->getLimitStart(), IL_CAL_DATE);
721  }
722  if ($this->getLimitEnd() != "") {
723  $to = new ilDateTime($this->getLimitEnd(), IL_CAL_DATE);
724  }
725 
726  if ($from == null && $to == null) {
727  return true;
728  }
729  if ($from <= $now && $now <= $to) {
730  return true;
731  }
732  if ($from <= $now && $to == null) {
733  return true;
734  }
735  if ($from == null && $now <= $to) {
736  return true;
737  }
738 
739  return ($from <= $now && $now <= $to);
740  }
741 
742  return true;
743  }
const IL_CAL_DATE
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cloneStructure()

ilDclTable::cloneStructure ( ilDclTable  $original)

Definition at line 1004 of file class.ilDclTable.php.

References doCreate(), doUpdate(), getAddPerm(), getDefaultSortField(), getDefaultSortFieldOrder(), getDeleteByOwner(), getDeletePerm(), getDescription(), getEditByOwner(), getEditPerm(), getExportEnabled(), getFields(), getId(), getImportEnabled(), getIsVisible(), getLimited(), getLimitEnd(), getLimitStart(), getOrder(), getPublicCommentsEnabled(), getRecords(), getSaveConfirmation(), getTableViews(), getTitle(), getViewOwnRecordsPerm(), setAddPerm(), ilDclCache\setCloneOf(), setDefaultSortField(), setDefaultSortFieldOrder(), setDeleteByOwner(), setDeletePerm(), setDescription(), setEditByOwner(), setEditPerm(), setExportEnabled(), setImportEnabled(), setIsVisible(), setLimited(), setLimitEnd(), setLimitStart(), setOrder(), setPublicCommentsEnabled(), setSaveConfirmation(), setTitle(), setViewOwnRecordsPerm(), and ilDclCache\TYPE_TABLE.

1004  : void
1005  {
1006  $this->setTitle($original->getTitle());
1007  $this->setDescription($original->getDescription());
1008  $this->setIsVisible($original->getIsVisible());
1009  $this->setEditByOwner($original->getEditByOwner());
1010  $this->setAddPerm($original->getAddPerm());
1011  $this->setEditPerm($original->getEditPerm());
1012  $this->setDeleteByOwner($original->getDeleteByOwner());
1013  $this->setSaveConfirmation($original->getSaveConfirmation());
1014  $this->setDeletePerm($original->getDeletePerm());
1015  $this->setLimited($original->getLimited());
1016  $this->setLimitStart($original->getLimitStart());
1017  $this->setLimitEnd($original->getLimitEnd());
1018  $this->setViewOwnRecordsPerm($original->getViewOwnRecordsPerm());
1019  $this->setExportEnabled($original->getExportEnabled());
1020  $this->setImportEnabled($original->getImportEnabled());
1023  $this->setOrder($original->getOrder());
1024 
1025  $this->doCreate(true, false);
1026  // reset stdFields to get new for the created object
1027 
1028  $default_sort_field = 0;
1029  // Clone standard-fields
1030  $org_std_fields = $original->getStandardFields();
1031  foreach ($this->getStandardFields() as $element_key => $std_field) {
1032  $std_field->clone($org_std_fields[$element_key]);
1033  if ($std_field->getId() === $original->getDefaultSortField()) {
1034  $default_sort_field = $std_field->getId();
1035  }
1036  }
1037 
1038  // Clone fields
1039  $new_fields = [];
1040  foreach ($original->getFields() as $orig_field) {
1041  if (!$orig_field->isStandardField()) {
1042  $class_name = get_class($orig_field);
1043  $new_field = new $class_name();
1044  $new_field->setTableId($this->getId());
1045  $new_field->cloneStructure((int) $orig_field->getId());
1046  $new_fields[$orig_field->getId()] = $new_field;
1047 
1048  if ($orig_field->getId() === $original->getDefaultSortField()) {
1049  $default_sort_field = $new_field->getId();
1050  }
1051  }
1052  }
1053 
1054  $this->setDefaultSortField((string) $default_sort_field);
1055  $this->doUpdate();
1056 
1057  // Clone Records with recordfields
1058  foreach ($original->getRecords() as $orig_record) {
1059  $new_record = new ilDclBaseRecordModel();
1060  $new_record->setTableId($this->getId());
1061  $new_record->cloneStructure($orig_record->getId(), $new_fields);
1062  }
1063 
1064  //clone tableviews (includes pageobjects)
1065  foreach ($original->getTableViews() as $orig_tableview) {
1066  $new_tableview = new ilDclTableView();
1067  $new_tableview->setTableId($this->getId());
1068  $new_tableview->cloneStructure($orig_tableview, $new_fields);
1069  }
1070 
1071  // mandatory for all cloning functions
1072  ilDclCache::setCloneOf($original->getId(), $this->getId(), ilDclCache::TYPE_TABLE);
1073  }
setIsVisible(bool $is_visible)
setEditByOwner(bool $edit_by_owner)
setDeleteByOwner(bool $delete_by_owner)
setEditPerm(bool $edit_perm)
getFields()
Returns all fields of this table including the standard fields.
setLimitStart(string $limit_start)
getId()
Get table id.
setDefaultSortFieldOrder(string $default_sort_field_order)
setOrder(int $table_order)
setTitle(string $a_title)
setLimitEnd(string $limit_end)
static setCloneOf(int $old, int $new, string $type)
string $default_sort_field
setExportEnabled(bool $export_enabled)
setSaveConfirmation(bool $save_confirmation)
setAddPerm(bool $add_perm)
setDeletePerm(bool $delete_perm)
setImportEnabled(bool $import_enabled)
setDescription(string $description)
doCreate(bool $create_tablefield_setting=true, bool $create_standardview=true)
setDefaultSortField(string $default_sort_field)
setViewOwnRecordsPerm(bool $view_own_perm)
setPublicCommentsEnabled(bool $public_comments)
setLimited(bool $limited)
+ Here is the call graph for this function:

◆ compareOrder()

ilDclTable::compareOrder ( ilDclBaseFieldModel  $a,
ilDclBaseFieldModel  $b 
)

Definition at line 989 of file class.ilDclTable.php.

References ilDclBaseFieldModel\getOrder().

989  : int
990  {
991  if (is_null($a->getOrder() == null) && is_null($b->getOrder() == null)) {
992  return 0;
993  }
994  if (is_null($a->getOrder())) {
995  return 1;
996  }
997  if (is_null($b->getOrder())) {
998  return -1;
999  }
1000 
1001  return $a->getOrder() < $b->getOrder() ? -1 : 1;
1002  }
+ Here is the call graph for this function:

◆ deleteField()

ilDclTable::deleteField ( int  $field_id)

Definition at line 327 of file class.ilDclTable.php.

References ilDclCache\getFieldCache(), and getRecords().

327  : void
328  {
329  $field = ilDclCache::getFieldCache($field_id);
330  $records = $this->getRecords();
331 
332  foreach ($records as $record) {
333  $record->deleteField($field_id);
334  }
335 
336  $field->doDelete();
337  }
static getFieldCache(int $field_id=0)
+ Here is the call graph for this function:

◆ doCreate()

ilDclTable::doCreate ( bool  $create_tablefield_setting = true,
bool  $create_standardview = true 
)

Definition at line 159 of file class.ilDclTable.php.

References buildOrderFields(), ilDclTableView\createOrGetStandardView(), getAddPerm(), getDefaultSortField(), getDefaultSortFieldOrder(), getDeleteByOwner(), getDeletePerm(), getDescription(), getEditByOwner(), getEditPerm(), getExportEnabled(), getId(), getImportEnabled(), getIsVisible(), getLimited(), getLimitEnd(), getLimitStart(), getObjId(), getOrder(), getPublicCommentsEnabled(), getSaveConfirmation(), getTitle(), getViewOwnRecordsPerm(), and setId().

Referenced by cloneStructure().

159  : void
160  {
161  $id = $this->db->nextId("il_dcl_table");
162  $this->setId($id);
163  $query = "INSERT INTO il_dcl_table (" . "id" . ", obj_id" . ", title" . ", add_perm" . ", edit_perm" . ", delete_perm" . ", edit_by_owner"
164  . ", limited" . ", limit_start" . ", limit_end" . ", is_visible" . ", export_enabled" . ", import_enabled" . ", default_sort_field_id"
165  . ", default_sort_field_order" . ", description" . ", public_comments" . ", view_own_records_perm"
166  . ", delete_by_owner, save_confirmation , table_order ) VALUES (" . $this->db->quote(
167  $this->getId(),
168  "integer"
169  ) . ","
170  . $this->db->quote($this->getObjId(), "integer") . "," . $this->db->quote($this->getTitle(), "text") . ","
171  . $this->db->quote($this->getAddPerm() ? 1 : 0, "integer") . "," . $this->db->quote(
172  $this->getEditPerm() ? 1 : 0,
173  "integer"
174  ) . ","
175  . $this->db->quote(
176  $this->getDeletePerm() ? 1 : 0,
177  "integer"
178  ) . "," . $this->db->quote($this->getEditByOwner() ? 1 : 0, "integer") . ","
179  . $this->db->quote($this->getLimited() ? 1 : 0, "integer") . "," . $this->db->quote(
180  $this->getLimitStart(),
181  "timestamp"
182  ) . ","
183  . $this->db->quote($this->getLimitEnd(), "timestamp") . "," . $this->db->quote(
184  $this->getIsVisible() ? 1 : 0,
185  "integer"
186  ) . ","
187  . $this->db->quote(
188  $this->getExportEnabled() ? 1 : 0,
189  "integer"
190  ) . "," . $this->db->quote($this->getImportEnabled() ? 1 : 0, "integer") . ","
191  . $this->db->quote($this->getDefaultSortField(), "text") . "," . $this->db->quote(
192  $this->getDefaultSortFieldOrder(),
193  "text"
194  ) . ","
195  . $this->db->quote($this->getDescription(), "text") . "," . $this->db->quote(
196  $this->getPublicCommentsEnabled(),
197  "integer"
198  ) . ","
199  . $this->db->quote(
200  $this->getViewOwnRecordsPerm(),
201  "integer"
202  ) . "," . $this->db->quote($this->getDeleteByOwner() ? 1 : 0, 'integer') . ","
203  . $this->db->quote($this->getSaveConfirmation() ? 1 : 0, 'integer') . "," . $this->db->quote(
204  $this->getOrder(),
205  'integer'
206  ) . ")";
207 
208  $this->db->manipulate($query);
209 
210  if ($create_standardview) {
211  //standard tableview
213  }
214 
215  if ($create_tablefield_setting) {
216  $this->buildOrderFields();
217  }
218  }
static createOrGetStandardView(int $table_id)
setId(int $a_id)
Set table id.
getId()
Get table id.
buildOrderFields()
buildOrderFields orders the fields.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ doDelete()

ilDclTable::doDelete ( bool  $delete_only_content = false,
bool  $omit_notification = false 
)

Delete table Attention this does not delete the maintable of it's the maintable of the collection.

unlink the the maintable in the collections object to make this work.

Definition at line 143 of file class.ilDclTable.php.

References getId(), getRecordFields(), and getRecords().

143  : void
144  {
145  foreach ($this->getRecords() as $record) {
146  $record->doDelete($omit_notification);
147  }
148 
149  foreach ($this->getRecordFields() as $field) {
150  $field->doDelete();
151  }
152 
153  if (!$delete_only_content) {
154  $query = "DELETE FROM il_dcl_table WHERE id = " . $this->db->quote($this->getId(), "integer");
155  $this->db->manipulate($query);
156  }
157  }
getId()
Get table id.
getRecordFields()
Returns all fields of this table which are NOT standard fields.
+ Here is the call graph for this function:

◆ doesRecordBelongToUser()

ilDclTable::doesRecordBelongToUser ( ilDclBaseRecordModel  $record)
protected

Definition at line 707 of file class.ilDclTable.php.

References ilDclBaseRecordModel\getOwner(), and ILIAS\Repository\user().

Referenced by hasPermissionToDeleteRecord(), and hasPermissionToEditRecord().

707  : bool
708  {
709  return ($this->user->getId() == $record->getOwner());
710  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ doRead()

ilDclTable::doRead ( )

Read table.

Definition at line 102 of file class.ilDclTable.php.

References getId(), setAddPerm(), setDefaultSortField(), setDefaultSortFieldOrder(), setDeleteByOwner(), setDeletePerm(), setDescription(), setEditByOwner(), setEditPerm(), setExportEnabled(), setImportEnabled(), setIsVisible(), setLimited(), setLimitEnd(), setLimitStart(), setObjId(), setOrder(), setPublicCommentsEnabled(), setSaveConfirmation(), setTitle(), and setViewOwnRecordsPerm().

Referenced by __construct().

102  : void
103  {
104  $query = "SELECT * FROM il_dcl_table WHERE id = " . $this->db->quote($this->getId(), "integer");
105  $set = $this->db->query($query);
106  $rec = $this->db->fetchAssoc($set);
107 
108  $this->setObjId($rec["obj_id"]);
109  if (null !== $rec["title"]) {
110  $this->setTitle($rec["title"]);
111  }
112  $this->setAddPerm((bool) $rec["add_perm"]);
113  $this->setEditPerm((bool) $rec["edit_perm"]);
114  $this->setDeletePerm((bool) $rec["delete_perm"]);
115  $this->setEditByOwner((bool) $rec["edit_by_owner"]);
116  if (null !== $rec["export_enabled"]) {
117  $this->setExportEnabled((bool) $rec["export_enabled"]);
118  }
119  $this->setImportEnabled((bool) $rec["import_enabled"]);
120  $this->setLimited((bool) $rec["limited"]);
121  $this->setLimitStart((string) $rec["limit_start"]);
122  $this->setLimitEnd((string) $rec["limit_end"]);
123  $this->setIsVisible((bool) $rec["is_visible"]);
124  if (null !== $rec['description']) {
125  $this->setDescription($rec['description']);
126  }
127  $this->setDefaultSortField((string) $rec['default_sort_field_id']);
128  $this->setDefaultSortFieldOrder($rec['default_sort_field_order']);
129  $this->setPublicCommentsEnabled((bool) $rec['public_comments']);
130  $this->setViewOwnRecordsPerm((bool) $rec['view_own_records_perm']);
131  $this->setDeleteByOwner((bool) $rec['delete_by_owner']);
132  $this->setSaveConfirmation((bool) $rec['save_confirmation']);
133  if (null !== $rec['table_order']) {
134  $this->setOrder($rec['table_order']);
135  }
136  }
setIsVisible(bool $is_visible)
setObjId(int $a_id)
setEditByOwner(bool $edit_by_owner)
setDeleteByOwner(bool $delete_by_owner)
setEditPerm(bool $edit_perm)
setLimitStart(string $limit_start)
getId()
Get table id.
setDefaultSortFieldOrder(string $default_sort_field_order)
setOrder(int $table_order)
setTitle(string $a_title)
setLimitEnd(string $limit_end)
setExportEnabled(bool $export_enabled)
setSaveConfirmation(bool $save_confirmation)
setAddPerm(bool $add_perm)
setDeletePerm(bool $delete_perm)
setImportEnabled(bool $import_enabled)
setDescription(string $description)
setDefaultSortField(string $default_sort_field)
setViewOwnRecordsPerm(bool $view_own_perm)
setPublicCommentsEnabled(bool $public_comments)
setLimited(bool $limited)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ doUpdate()

ilDclTable::doUpdate ( )

Definition at line 220 of file class.ilDclTable.php.

References getAddPerm(), getDefaultSortField(), getDefaultSortFieldOrder(), getDeleteByOwner(), getDeletePerm(), getDescription(), getEditByOwner(), getEditPerm(), getExportEnabled(), getId(), getImportEnabled(), getIsVisible(), getLimited(), getLimitEnd(), getLimitStart(), getObjId(), getOrder(), getPublicCommentsEnabled(), getSaveConfirmation(), getTitle(), and getViewOwnRecordsPerm().

Referenced by cloneStructure().

220  : void
221  {
222  $this->db->update(
223  "il_dcl_table",
224  [
225  "obj_id" => ["integer", $this->getObjId()],
226  "title" => ["text", $this->getTitle()],
227  "add_perm" => ["integer", (int) $this->getAddPerm()],
228  "edit_perm" => ["integer", (int) $this->getEditPerm()],
229  "delete_perm" => ["integer", (int) $this->getDeletePerm()],
230  "edit_by_owner" => ["integer", (int) $this->getEditByOwner()],
231  "limited" => ["integer", $this->getLimited()],
232  "limit_start" => ["timestamp", $this->getLimitStart()],
233  "limit_end" => ["timestamp", $this->getLimitEnd()],
234  "is_visible" => ["integer", $this->getIsVisible() ? 1 : 0],
235  "export_enabled" => ["integer", $this->getExportEnabled() ? 1 : 0],
236  "import_enabled" => ["integer", $this->getImportEnabled() ? 1 : 0],
237  "description" => ["text", $this->getDescription()],
238  "default_sort_field_id" => ["text", $this->getDefaultSortField()],
239  "default_sort_field_order" => ["text", $this->getDefaultSortFieldOrder()],
240  "public_comments" => ["integer", $this->getPublicCommentsEnabled() ? 1 : 0],
241  "view_own_records_perm" => ["integer", $this->getViewOwnRecordsPerm()],
242  'delete_by_owner' => ['integer', $this->getDeleteByOwner() ? 1 : 0],
243  'save_confirmation' => ['integer', $this->getSaveConfirmation() ? 1 : 0],
244  'table_order' => ['integer', $this->getOrder()],
245  ],
246  [
247  "id" => ["integer", $this->getId()],
248  ]
249  );
250  }
getId()
Get table id.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAddPerm()

ilDclTable::getAddPerm ( )

Definition at line 821 of file class.ilDclTable.php.

References $add_perm.

Referenced by cloneStructure(), doCreate(), and doUpdate().

821  : bool
822  {
823  return $this->add_perm;
824  }
+ Here is the caller graph for this function:

◆ getCollectionObject()

ilDclTable::getCollectionObject ( )

Definition at line 288 of file class.ilDclTable.php.

References $obj, and loadObj().

Referenced by getVisibleTableViews().

289  {
290  $this->loadObj();
291 
292  return $this->obj;
293  }
ilObjDataCollection $obj
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCustomFields()

ilDclTable::getCustomFields ( )
Returns
ilDclBaseFieldModel[]

Definition at line 398 of file class.ilDclTable.php.

References $fields, and loadCustomFields().

398  : array
399  {
400  if (!$this->fields) {
401  $this->loadCustomFields();
402  }
403 
404  return $this->fields;
405  }
+ Here is the call graph for this function:

◆ getDefaultSortField()

ilDclTable::getDefaultSortField ( )

Definition at line 934 of file class.ilDclTable.php.

References $default_sort_field.

Referenced by cloneStructure(), doCreate(), and doUpdate().

934  : string
935  {
937  }
string $default_sort_field
+ Here is the caller graph for this function:

◆ getDefaultSortFieldOrder()

ilDclTable::getDefaultSortFieldOrder ( )

Definition at line 947 of file class.ilDclTable.php.

References $default_sort_field_order.

Referenced by cloneStructure(), doCreate(), and doUpdate().

947  : string
948  {
950  }
string $default_sort_field_order
Default sort-order (asc|desc)
+ Here is the caller graph for this function:

◆ getDeleteByOwner()

ilDclTable::getDeleteByOwner ( )

Definition at line 852 of file class.ilDclTable.php.

References $delete_by_owner.

Referenced by cloneStructure(), doCreate(), doUpdate(), and hasPermissionToDeleteRecord().

852  : bool
853  {
854  return $this->delete_by_owner;
855  }
+ Here is the caller graph for this function:

◆ getDeletePerm()

ilDclTable::getDeletePerm ( )

Definition at line 834 of file class.ilDclTable.php.

References $delete_perm.

Referenced by cloneStructure(), doCreate(), doUpdate(), hasPermissionToDeleteRecord(), and hasPermissionToDeleteRecords().

834  : bool
835  {
836  return $this->delete_perm;
837  }
+ Here is the caller graph for this function:

◆ getDescription()

ilDclTable::getDescription ( )

Definition at line 923 of file class.ilDclTable.php.

References $description.

Referenced by cloneStructure(), doCreate(), and doUpdate().

923  : string
924  {
925  return $this->description;
926  }
string $description
Description for this table displayed above records.
+ Here is the caller graph for this function:

◆ getEditableFields()

ilDclTable::getEditableFields ( bool  $creation_mode)
Parameters
bool$creation_mode
Returns
array

Definition at line 575 of file class.ilDclTable.php.

References getRecordFields(), ILIAS\FileDelivery\http(), and ILIAS\Repository\refinery().

575  : array
576  {
577  $fields = $this->getRecordFields();
578  $editableFields = [];
579 
580  foreach ($fields as $field) {
581  $tableview_id = $this->http->wrapper()->post()->retrieve(
582  'tableview_id',
583  $this->refinery->kindlyTo()->int()
584  );
585  if (!$field->getViewSetting($tableview_id)->isLocked($creation_mode)) {
586  $editableFields[] = $field;
587  }
588  }
589 
590  return $editableFields;
591  }
static http()
Fetches the global http state from ILIAS.
getRecordFields()
Returns all fields of this table which are NOT standard fields.
+ Here is the call graph for this function:

◆ getEditByOwner()

ilDclTable::getEditByOwner ( )

Definition at line 847 of file class.ilDclTable.php.

References $edit_by_owner.

Referenced by cloneStructure(), doCreate(), doUpdate(), and hasPermissionToEditRecord().

847  : bool
848  {
849  return $this->edit_by_owner;
850  }
+ Here is the caller graph for this function:

◆ getEditPerm()

ilDclTable::getEditPerm ( )

Definition at line 873 of file class.ilDclTable.php.

References $edit_perm.

Referenced by cloneStructure(), doCreate(), doUpdate(), and hasPermissionToEditRecord().

873  : bool
874  {
875  return $this->edit_perm;
876  }
+ Here is the caller graph for this function:

◆ getExportableFields()

ilDclTable::getExportableFields ( )

Return all the fields that are marked as exportable.

Returns
ilDclBaseFieldModel[]

Definition at line 597 of file class.ilDclTable.php.

References getFields().

597  : array
598  {
599  $fields = $this->getFields();
600  $exportableFields = [];
601  foreach ($fields as $field) {
602  if ($field->getExportable()) {
603  $exportableFields[] = $field;
604  }
605  }
606 
607  return $exportableFields;
608  }
getFields()
Returns all fields of this table including the standard fields.
+ Here is the call graph for this function:

◆ getExportEnabled()

ilDclTable::getExportEnabled ( )

Definition at line 1137 of file class.ilDclTable.php.

References $export_enabled.

Referenced by cloneStructure(), doCreate(), and doUpdate().

1137  : bool
1138  {
1139  return $this->export_enabled;
1140  }
+ Here is the caller graph for this function:

◆ getField()

ilDclTable::getField ( string  $field_id)

Definition at line 339 of file class.ilDclTable.php.

References getFields().

Referenced by getPartialRecords().

340  {
341  $fields = $this->getFields();
342  $field = null;
343  foreach ($fields as $field_1) {
344  if ($field_1->getId() == $field_id) {
345  $field = $field_1;
346  }
347  }
348 
349  return $field;
350  }
getFields()
Returns all fields of this table including the standard fields.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getFieldByTitle()

ilDclTable::getFieldByTitle ( string  $title)

Get a field by title.

Definition at line 803 of file class.ilDclTable.php.

References $title, and getFields().

Referenced by getPartialRecords().

804  {
805  $return = null;
806  foreach ($this->getFields() as $field) {
807  if ($field->getTitle() == $title) {
808  $return = $field;
809  break;
810  }
811  }
812 
813  return $return;
814  }
getFields()
Returns all fields of this table including the standard fields.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getFieldIds()

ilDclTable::getFieldIds ( )

Definition at line 352 of file class.ilDclTable.php.

References getFields().

352  : array
353  {
354  $field_ids = [];
355  foreach ($this->getFields() as $field) {
356  if ($field->getId()) {
357  $field_ids[] = $field->getId();
358  }
359  }
360 
361  return $field_ids;
362  }
getFields()
Returns all fields of this table including the standard fields.
+ Here is the call graph for this function:

◆ getFields()

ilDclTable::getFields ( )

Returns all fields of this table including the standard fields.

Parameters
bool$force_include_commentsby default false, so comments will only load when enabled in tablesettings
Returns
ilDclBaseFieldModel[]

Definition at line 454 of file class.ilDclTable.php.

References $all_fields, and reloadFields().

Referenced by afterClone(), buildOrderFields(), cloneStructure(), ilDclContentExporter\fillHeaderExcel(), ilDclContentExporter\fillRowExcel(), getExportableFields(), getField(), getFieldByTitle(), getFieldIds(), getFieldsForFormula(), getNewFieldOrder(), and updateFields().

454  : array
455  {
456  if ($this->all_fields == null) {
457  $this->reloadFields();
458  }
459 
460  return $this->all_fields;
461  }
array $all_fields
table fields and std fields combined
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getFieldsForFormula()

ilDclTable::getFieldsForFormula ( )

Returns all fields of this table including the standard fields, wich are supported for formulas.

Returns
ilDclBaseFieldModel[]

Definition at line 515 of file class.ilDclTable.php.

References $stdFields, ilDclStandardField\_getStandardFields(), getFields(), getPublicCommentsEnabled(), and ilDclFormulaFieldModel\SUPPORTED_FIELDS.

515  : array
516  {
517  $syntax_chars = array_merge(
518  array_map(static fn(Operators $function): string => $function->value, Operators::cases()),
519  array_map(static fn(Functions $function): string => $function->value, Functions::cases()),
520  ['(', ')', ',']
521  );
522  foreach ($this->getFields() as $field) {
523  if (in_array($field->getDatatypeId(), ilDclFormulaFieldModel::SUPPORTED_FIELDS)) {
524  foreach ($syntax_chars as $element) {
525  if (str_contains($field->getTitle(), $element)) {
526  continue 2;
527  }
528  }
529  $return[] = $field;
530  }
531  }
532 
533  return $return;
534  }
getFields()
Returns all fields of this table including the standard fields.
+ Here is the call graph for this function:

◆ getFirstTableViewId()

ilDclTable::getFirstTableViewId ( int  $user_id = 0,
bool  $with_detailed_view = false 
)

Definition at line 503 of file class.ilDclTable.php.

References getVisibleTableViews().

503  : ?int
504  {
505  $array = $this->getVisibleTableViews($user_id, $with_detailed_view);
506  $tableview = array_shift($array);
507 
508  return $tableview?->getId();
509  }
getVisibleTableViews(int $user_id=0, bool $with_active_detailedview=false)
+ Here is the call graph for this function:

◆ getId()

ilDclTable::getId ( )

◆ getImportEnabled()

ilDclTable::getImportEnabled ( )

Definition at line 1174 of file class.ilDclTable.php.

References $import_enabled.

Referenced by cloneStructure(), doCreate(), and doUpdate().

1174  : bool
1175  {
1176  return $this->import_enabled;
1177  }
+ Here is the caller graph for this function:

◆ getIsVisible()

ilDclTable::getIsVisible ( )

Definition at line 913 of file class.ilDclTable.php.

References $is_visible.

Referenced by cloneStructure(), doCreate(), doUpdate(), and ilDclTableListTableGUI\fillRowFromObject().

913  : bool
914  {
915  return $this->is_visible;
916  }
+ Here is the caller graph for this function:

◆ getLimited()

ilDclTable::getLimited ( )

Definition at line 883 of file class.ilDclTable.php.

References $limited.

Referenced by checkLimit(), cloneStructure(), doCreate(), and doUpdate().

883  : bool
884  {
885  return $this->limited;
886  }
+ Here is the caller graph for this function:

◆ getLimitEnd()

ilDclTable::getLimitEnd ( )

Definition at line 893 of file class.ilDclTable.php.

References $limit_end.

Referenced by checkLimit(), cloneStructure(), doCreate(), and doUpdate().

893  : string
894  {
895  return $this->limit_end;
896  }
+ Here is the caller graph for this function:

◆ getLimitStart()

ilDclTable::getLimitStart ( )

Definition at line 903 of file class.ilDclTable.php.

References $limit_start.

Referenced by checkLimit(), cloneStructure(), doCreate(), and doUpdate().

903  : string
904  {
905  return $this->limit_start;
906  }
string $limit_start
+ Here is the caller graph for this function:

◆ getNewFieldOrder()

ilDclTable::getNewFieldOrder ( )

getNewOrder

Returns
int returns the place where a new field should be placed.

Definition at line 411 of file class.ilDclTable.php.

References getFields().

411  : int
412  {
413  $fields = $this->getFields();
414  $place = 0;
415  foreach ($fields as $field) {
416  if (!$field->isStandardField()) {
417  $place = $field->getOrder() + 1;
418  }
419  }
420 
421  return $place;
422  }
getFields()
Returns all fields of this table including the standard fields.
+ Here is the call graph for this function:

◆ getNewTableviewOrder()

ilDclTable::getNewTableviewOrder ( )
Returns
int

Definition at line 427 of file class.ilDclTable.php.

References ilDclTableView\getCountForTableId(), and getId().

427  : int
428  {
429  return (ilDclTableView::getCountForTableId($this->getId()) + 1) * 10;
430  }
getId()
Get table id.
static getCountForTableId(int $table_id)
+ Here is the call graph for this function:

◆ getObjId()

ilDclTable::getObjId ( )

◆ getOrder()

ilDclTable::getOrder ( )

Definition at line 1142 of file class.ilDclTable.php.

References $table_order, and updateOrder().

Referenced by cloneStructure(), doCreate(), doUpdate(), and ilDclTableListTableGUI\fillRowFromObject().

1142  : int
1143  {
1144  if (!$this->table_order) {
1145  $this->updateOrder();
1146  }
1147 
1148  return $this->table_order;
1149  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPartialRecords()

ilDclTable::getPartialRecords ( string  $ref_id,
string  $sort,
string  $direction,
?int  $limit,
int  $offset,
array  $filter = [] 
)

Return only the needed subset of record objects for the table, according to sorting, paging and filters.

Parameters
string$sortTitle of a field where the ilTable2GUI is sorted
string$direction'desc' or 'asc'
int$limitLimit of records
int$offsetOffset from records
array$filterContaining the filter values
Returns
array Array with two keys: 'record' => Contains the record objects, 'total' => Number of total records (without slicing)

Definition at line 1205 of file class.ilDclTable.php.

References Vendor\Package\$a, Vendor\Package\$b, $DIC, $id, ILIAS\LTI\ToolProvider\$key, $records, getField(), getFieldByTitle(), getId(), getObjId(), ilDclCache\getRecordCache(), getViewOwnRecordsPerm(), ilObjDataCollectionAccess\hasEditAccess(), ilObjDataCollectionAccess\hasWriteAccess(), ilSession\set(), and ILIAS\Repository\user().

Referenced by ilDclRecordListGUI\getRecordListTableGUI().

1212  : array {
1213  $sort_field = $this->getFieldByTitle($sort);
1214  $direction = strtolower($direction);
1215  $direction = (in_array($direction, ['desc', 'asc'])) ? $direction : 'asc';
1216 
1217  // Sorting by a status from an ILIAS Ref field. This column is added dynamically to the table, there is no field model
1218  $sort_by_status = false;
1219  if (substr($sort, 0, 8) == '_status_') {
1220  $sort_by_status = true;
1221  $sort_field = $this->getFieldByTitle(substr($sort, 8));
1222  }
1223 
1224  if (is_null($sort_field)) {
1225  $sort_field = $this->getField('id');
1226  }
1227 
1228  $sort_query_object = $sort_field->getRecordQuerySortObject($direction, $sort_by_status);
1229 
1230  $select_str = ($sort_query_object != null) ? $sort_query_object->getSelectStatement() : '';
1231  $join_str = ($sort_query_object != null) ? $sort_query_object->getJoinStatement() : '';
1232  $where_str = ($sort_query_object != null) ? $sort_query_object->getWhereStatement() : '';
1233  $order_str = ($sort_query_object != null) ? $sort_query_object->getOrderStatement() : '';
1234  $group_str = ($sort_query_object != null) ? $sort_query_object->getGroupStatement() : '';
1235 
1236  if (count($filter)) {
1237  foreach ($filter as $key => $filter_value) {
1238  $filter_field_id = substr($key, 7);
1239  $filter_field = $this->getField($filter_field_id);
1240  $filter_record_query_object = $filter_field->getRecordQueryFilterObject($filter_value, $sort_field);
1241 
1242  if ($filter_record_query_object) {
1243  $select_str .= $filter_record_query_object->getSelectStatement();
1244  $join_str .= $filter_record_query_object->getJoinStatement();
1245  $where_str .= $filter_record_query_object->getWhereStatement();
1246  $group_str .= $filter_record_query_object->getGroupStatement();
1247  }
1248  }
1249  }
1250 
1251  // Build the query string
1252  $sql = "SELECT DISTINCT record.id, record.owner";
1253  if ($select_str) {
1254  $sql .= ', ';
1255  }
1256 
1257  $as = ' AS ';
1258 
1259  $sql .= rtrim($select_str, ',') . " FROM il_dcl_record $as record ";
1260  $sql .= $join_str;
1261  $sql .= " WHERE record.table_id = " . $this->db->quote($this->getId(), 'integer');
1262 
1263  if (strlen($where_str) > 0) {
1264  $sql .= $where_str;
1265  }
1266 
1267  if (strlen($group_str) > 0) {
1268  $sql .= " GROUP BY " . $group_str;
1269  }
1270 
1271  if (strlen($order_str) > 0) {
1272  $sql .= " ORDER BY " . $order_str;
1273  }
1274 
1275  $set = $this->db->query($sql);
1276  $total_record_ids = [];
1277 
1279  while ($rec = $this->db->fetchAssoc($set)) {
1280  // Quick check if the current user is allowed to view the record
1281  if (!$is_allowed_to_view && ($this->getViewOwnRecordsPerm() && $this->user->getId() != $rec['owner'])) {
1282  continue;
1283  }
1284  $total_record_ids[] = $rec['id'];
1285  }
1286  // Save record-ids in session to enable prev/next links in detail view
1287  ilSession::set('dcl_table_id', $this->getId());
1288  ilSession::set('dcl_record_ids', $total_record_ids);
1289 
1290  if ($sort_query_object != null) {
1291  $total_record_ids = $sort_query_object->applyCustomSorting($sort_field, $total_record_ids, $direction);
1292  }
1293 
1294  if ($sort === 'n_comments') {
1295  global $DIC;
1296  $comments_nr = [];
1297  foreach ($total_record_ids as $id) {
1298  $comments_nr[$id] = $DIC->notes()->domain()->getNrOfCommentsForContext($DIC->notes()->data()->context($this->getObjId(), $id, 'dcl'));
1299  }
1300  uasort($comments_nr, static fn($a, $b) => ($direction === 'asc' ? 1 : -1) * ($a <=> $b));
1301  $total_record_ids = array_keys($comments_nr);
1302  }
1303 
1304  // Now slice the array to load only the needed records in memory
1305  $record_ids = array_slice($total_record_ids, $offset, $limit);
1306 
1307  $records = [];
1308  foreach ($record_ids as $id) {
1310  }
1311 
1312  return ['records' => $records, 'total' => count($total_record_ids)];
1313  }
getFieldByTitle(string $title)
Get a field by title.
getId()
Get table id.
global $DIC
Definition: feed.php:28
$ref_id
Definition: ltiauth.php:67
string $key
Consumer key/client ID value.
Definition: System.php:193
static hasWriteAccess(int $ref, ?int $user_id=0)
getField(string $field_id)
static getRecordCache(?int $record_id)
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples
static hasEditAccess(int $ref, ?int $user_id=0)
static set(string $a_var, $a_val)
Set a value.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getPublicCommentsEnabled()

ilDclTable::getPublicCommentsEnabled ( )

Definition at line 957 of file class.ilDclTable.php.

References $public_comments.

Referenced by cloneStructure(), doCreate(), doUpdate(), ilDclTableListTableGUI\fillRowFromObject(), and getFieldsForFormula().

957  : bool
958  {
959  return $this->public_comments;
960  }
bool $public_comments
True if users can add comments on each record of this table.
+ Here is the caller graph for this function:

◆ getRecordFields()

ilDclTable::getRecordFields ( )

Returns all fields of this table which are NOT standard fields.

Returns
ilDclBaseFieldModel[]

Definition at line 564 of file class.ilDclTable.php.

References $fields, and loadCustomFields().

Referenced by doDelete(), getEditableFields(), ilDclContentImporter\getImportFieldsFromTitles(), and ilDclDetailedViewGUI\renderRecord().

564  : array
565  {
566  $this->loadCustomFields();
567 
568  return $this->fields;
569  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getRecords()

ilDclTable::getRecords ( )
Returns
ilDclBaseRecordModel[]

Definition at line 305 of file class.ilDclTable.php.

References $records, and loadRecords().

Referenced by _hasRecords(), afterClone(), cloneStructure(), deleteField(), and doDelete().

305  : array
306  {
307  if ($this->records == null) {
308  $this->loadRecords();
309  }
310 
311  return $this->records;
312  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSaveConfirmation()

ilDclTable::getSaveConfirmation ( )

Definition at line 972 of file class.ilDclTable.php.

References $save_confirmation.

Referenced by cloneStructure(), doCreate(), and doUpdate().

972  : bool
973  {
975  }
bool $save_confirmation
+ Here is the caller graph for this function:

◆ getTableViews()

ilDclTable::getTableViews ( )
Returns
ilDclTableView[] all tableviews ordered by tableview_order

Definition at line 477 of file class.ilDclTable.php.

References ilDclTableView\getAllForTableId(), and getId().

Referenced by cloneStructure(), getVisibleTableViews(), and sortTableViews().

477  : array
478  {
479  return ilDclTableView::getAllForTableId($this->getId());
480  }
getId()
Get table id.
static getAllForTableId(int $table_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTitle()

ilDclTable::getTitle ( )

Definition at line 283 of file class.ilDclTable.php.

References $title.

Referenced by ilDclTableEditGUI\checkInput(), cloneStructure(), doCreate(), doUpdate(), and ilDclTableListTableGUI\fillRowFromObject().

283  : string
284  {
285  return $this->title;
286  }
+ Here is the caller graph for this function:

◆ getViewOwnRecordsPerm()

ilDclTable::getViewOwnRecordsPerm ( )

Definition at line 967 of file class.ilDclTable.php.

References $view_own_records_perm.

Referenced by cloneStructure(), doCreate(), doUpdate(), getPartialRecords(), and hasPermissionToViewRecord().

967  : bool
968  {
969  return (bool) $this->view_own_records_perm;
970  }
int $view_own_records_perm
True if user can only view his/her own entries in the table.
+ Here is the caller graph for this function:

◆ getVisibleTableViews()

ilDclTable::getVisibleTableViews ( int  $user_id = 0,
bool  $with_active_detailedview = false 
)
Returns
ilDclTableView[]

Definition at line 485 of file class.ilDclTable.php.

References getCollectionObject(), getTableViews(), ilObjDataCollectionAccess\hasAccessToTableView(), ilObjDataCollectionAccess\hasWriteAccess(), and ilDclDetailedViewDefinition\isActive().

Referenced by getFirstTableViewId().

485  : array
486  {
487  if (ilObjDataCollectionAccess::hasWriteAccess($this->getCollectionObject()->getRefId(), $user_id) && !$with_active_detailedview) {
488  return $this->getTableViews();
489  }
490 
491  $visible_views = [];
492  foreach ($this->getTableViews() as $tableView) {
493  if (ilObjDataCollectionAccess::hasAccessToTableView($tableView, $user_id)) {
494  if (!$with_active_detailedview || ilDclDetailedViewDefinition::isActive($tableView->getId())) {
495  $visible_views[] = $tableView;
496  }
497  }
498  }
499 
500  return $visible_views;
501  }
static hasAccessToTableView(ilDclTableView $tableview, ?int $user_id=0)
static hasWriteAccess(int $ref, ?int $user_id=0)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hasCustomFields()

ilDclTable::hasCustomFields ( )

Definition at line 982 of file class.ilDclTable.php.

References loadCustomFields().

982  : bool
983  {
984  $this->loadCustomFields();
985 
986  return count($this->fields) > 0;
987  }
+ Here is the call graph for this function:

◆ hasPermissionToDeleteRecord()

ilDclTable::hasPermissionToDeleteRecord ( int  $ref_id,
ilDclBaseRecordModel  $record 
)
Parameters
int$ref_idthe reference id of the current datacollection object
ilDclBaseRecordModel$recordthe record which will be deleted

Definition at line 646 of file class.ilDclTable.php.

References ilObject\_lookupObjectId(), checkLimit(), doesRecordBelongToUser(), getDeleteByOwner(), getDeletePerm(), getObjId(), ilObjDataCollectionAccess\hasAddRecordAccess(), and ilObjDataCollectionAccess\hasWriteAccess().

646  : bool
647  {
649  return false;
650  }
652  return true;
653  }
655  return false;
656  }
657  if (!$this->checkLimit()) {
658  return false;
659  }
660  if ($this->getDeletePerm() && !$this->getDeleteByOwner()) {
661  return true;
662  }
663  if ($this->getDeleteByOwner()) {
664  return $this->doesRecordBelongToUser($record);
665  }
666 
667  return false;
668  }
static hasAddRecordAccess(int $ref, ?int $user_id=0)
doesRecordBelongToUser(ilDclBaseRecordModel $record)
$ref_id
Definition: ltiauth.php:67
static _lookupObjectId(int $ref_id)
static hasWriteAccess(int $ref, ?int $user_id=0)
+ Here is the call graph for this function:

◆ hasPermissionToDeleteRecords()

ilDclTable::hasPermissionToDeleteRecords ( int  $ref_id)
Parameters
$ref_id
Returns
bool

Definition at line 674 of file class.ilDclTable.php.

References ilObject\_lookupObjectId(), getDeletePerm(), getObjId(), ilObjDataCollectionAccess\hasAddRecordAccess(), and ilObjDataCollectionAccess\hasWriteAccess().

674  : bool
675  {
677  return false;
678  }
679 
682  }
static hasAddRecordAccess(int $ref, ?int $user_id=0)
$ref_id
Definition: ltiauth.php:67
static _lookupObjectId(int $ref_id)
static hasWriteAccess(int $ref, ?int $user_id=0)
+ Here is the call graph for this function:

◆ hasPermissionToEditRecord()

ilDclTable::hasPermissionToEditRecord ( int  $ref_id,
ilDclBaseRecordModel  $record 
)
Parameters
$ref_idint the reference id of the current datacollection object
$recordilDclBaseRecordModel the record which will be edited
Returns
bool

Definition at line 615 of file class.ilDclTable.php.

References ilObject\_lookupObjectId(), checkLimit(), doesRecordBelongToUser(), getEditByOwner(), getEditPerm(), getObjId(), ilObjDataCollectionAccess\hasAddRecordAccess(), ilObjDataCollectionAccess\hasEditAccess(), and ilObjDataCollectionAccess\hasWriteAccess().

615  : bool
616  {
618  return false;
619  }
621  return true;
622  }
624  return false;
625  }
626  if ($this->getEditByOwner()) {
627  return $this->doesRecordBelongToUser($record);
628  }
629  if (!$this->checkLimit()) {
630  return false;
631  }
633  return true;
634  }
635  if ($this->getEditPerm() && !$this->getEditByOwner()) {
636  return true;
637  }
638 
639  return false;
640  }
static hasAddRecordAccess(int $ref, ?int $user_id=0)
doesRecordBelongToUser(ilDclBaseRecordModel $record)
$ref_id
Definition: ltiauth.php:67
static _lookupObjectId(int $ref_id)
static hasWriteAccess(int $ref, ?int $user_id=0)
static hasEditAccess(int $ref, ?int $user_id=0)
+ Here is the call graph for this function:

◆ hasPermissionToViewRecord()

ilDclTable::hasPermissionToViewRecord ( int  $ref_id,
ilDclBaseRecordModel  $record,
int  $user_id = 0 
)

Definition at line 684 of file class.ilDclTable.php.

References ilObject\_lookupObjectId(), getObjId(), ilDclBaseRecordModel\getOwner(), getViewOwnRecordsPerm(), ilObjDataCollectionAccess\hasEditAccess(), ilObjDataCollectionAccess\hasReadAccess(), ilObjDataCollectionAccess\hasWriteAccess(), and ILIAS\Repository\user().

684  : bool
685  {
687  return false;
688  }
690  $ref_id,
691  $user_id
693  return true;
694  }
696  // Check for view only own entries setting
697  if ($this->getViewOwnRecordsPerm() && ($user_id ?: $this->user->getId()) != $record->getOwner()) {
698  return false;
699  }
700 
701  return true;
702  }
703 
704  return false;
705  }
$ref_id
Definition: ltiauth.php:67
static _lookupObjectId(int $ref_id)
static hasWriteAccess(int $ref, ?int $user_id=0)
static hasReadAccess(int $ref, ?int $user_id=0)
static hasEditAccess(int $ref, ?int $user_id=0)
+ Here is the call graph for this function:

◆ loadCustomFields()

ilDclTable::loadCustomFields ( )
protected

Definition at line 364 of file class.ilDclTable.php.

References $fields, ilDclCache\buildFieldFromRecord(), ilDclDatatype\getAllDatatype(), getId(), and ilDclCache\preloadFieldProperties().

Referenced by getCustomFields(), getRecordFields(), hasCustomFields(), and reloadFields().

364  : void
365  {
366  if (!$this->fields) {
367  $query
368  = "SELECT DISTINCT il_dcl_field.*, il_dcl_tfield_set.field_order
369  FROM il_dcl_field
370  INNER JOIN il_dcl_tfield_set
371  ON ( il_dcl_tfield_set.field NOT IN ('owner',
372  'last_update',
373  'last_edit_by',
374  'id',
375  'create_date')
376  AND il_dcl_tfield_set.table_id = il_dcl_field.table_id
377  AND il_dcl_tfield_set.field = " . $this->db->cast("il_dcl_field.id", "text") . ")
378  WHERE il_dcl_field.table_id = %s
379  ORDER BY il_dcl_tfield_set.field_order ASC";
380 
381  $set = $this->db->queryF($query, ['integer'], [$this->getId()]);
382  $fields = [];
383  while ($rec = $this->db->fetchAssoc($set)) {
384  $field = ilDclCache::buildFieldFromRecord($rec);
385  if ($this->show_invalid || in_array($field->getDatatypeId(), array_keys(ilDclDatatype::getAllDatatype()))) {
386  $fields[] = $field;
387  }
388  }
389  $this->fields = $fields;
390 
392  }
393  }
static preloadFieldProperties(array $fields)
Preloads field properties.
getId()
Get table id.
static getAllDatatype(bool $force=false)
Get all possible Datatypes.
static buildFieldFromRecord(array $rec)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ loadObj()

ilDclTable::loadObj ( )
protected

Definition at line 295 of file class.ilDclTable.php.

Referenced by getCollectionObject().

295  : void
296  {
297  if ($this->obj == null) {
298  $this->obj = new ilObjDataCollection($this->objId, false);
299  }
300  }
+ Here is the caller graph for this function:

◆ loadRecords()

ilDclTable::loadRecords ( )

Definition at line 314 of file class.ilDclTable.php.

References $records, and ilDclCache\getRecordCache().

Referenced by getRecords().

314  : void
315  {
316  $records = [];
317  $query = "SELECT id FROM il_dcl_record WHERE table_id = " . $this->db->quote($this->id, "integer");
318  $set = $this->db->query($query);
319 
320  while ($rec = $this->db->fetchAssoc($set)) {
321  $records[$rec['id']] = ilDclCache::getRecordCache($rec['id']);
322  }
323 
324  $this->records = $records;
325  }
static getRecordCache(?int $record_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ reloadFields()

ilDclTable::reloadFields ( )

Definition at line 463 of file class.ilDclTable.php.

References $fields, loadCustomFields(), and sortByOrder().

Referenced by getFields().

463  : void
464  {
465  $this->loadCustomFields();
466  $this->stdFields = $this->getStandardFields();
467  $fields = array_merge($this->fields, $this->stdFields);
468 
469  $this->sortByOrder($fields);
470 
471  $this->all_fields = $fields;
472  }
sortByOrder(array &$array)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setAddPerm()

ilDclTable::setAddPerm ( bool  $add_perm)

Definition at line 816 of file class.ilDclTable.php.

References $add_perm.

Referenced by cloneStructure(), and doRead().

816  : void
817  {
818  $this->add_perm = $add_perm;
819  }
+ Here is the caller graph for this function:

◆ setDefaultSortField()

ilDclTable::setDefaultSortField ( string  $default_sort_field)

Definition at line 928 of file class.ilDclTable.php.

References $default_sort_field.

Referenced by cloneStructure(), and doRead().

928  : void
929  {
930  $default_sort_field = ($default_sort_field) ?: ""; // Change null or empty strings to zero
931  $this->default_sort_field = $default_sort_field;
932  }
string $default_sort_field
+ Here is the caller graph for this function:

◆ setDefaultSortFieldOrder()

ilDclTable::setDefaultSortFieldOrder ( string  $default_sort_field_order)

Definition at line 939 of file class.ilDclTable.php.

References $default_sort_field_order.

Referenced by cloneStructure(), and doRead().

939  : void
940  {
941  if (!in_array($default_sort_field_order, ['asc', 'desc'])) {
943  }
944  $this->default_sort_field_order = $default_sort_field_order;
945  }
string $default_sort_field_order
Default sort-order (asc|desc)
+ Here is the caller graph for this function:

◆ setDeleteByOwner()

ilDclTable::setDeleteByOwner ( bool  $delete_by_owner)

Definition at line 857 of file class.ilDclTable.php.

References $delete_by_owner, and setDeletePerm().

Referenced by cloneStructure(), doRead(), and setDeletePerm().

857  : void
858  {
859  $this->delete_by_owner = $delete_by_owner;
860  if ($delete_by_owner) {
861  $this->setDeletePerm(true);
862  }
863  }
setDeletePerm(bool $delete_perm)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setDeletePerm()

ilDclTable::setDeletePerm ( bool  $delete_perm)

Definition at line 826 of file class.ilDclTable.php.

References $delete_perm, and setDeleteByOwner().

Referenced by cloneStructure(), doRead(), and setDeleteByOwner().

826  : void
827  {
828  $this->delete_perm = $delete_perm;
829  if (!$delete_perm) {
830  $this->setDeleteByOwner(false);
831  }
832  }
setDeleteByOwner(bool $delete_by_owner)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setDescription()

ilDclTable::setDescription ( string  $description)

Definition at line 918 of file class.ilDclTable.php.

References $description.

Referenced by cloneStructure(), and doRead().

918  : void
919  {
920  $this->description = $description;
921  }
string $description
Description for this table displayed above records.
+ Here is the caller graph for this function:

◆ setEditByOwner()

ilDclTable::setEditByOwner ( bool  $edit_by_owner)

Definition at line 839 of file class.ilDclTable.php.

References $edit_by_owner, and setEditPerm().

Referenced by cloneStructure(), doRead(), and setEditPerm().

839  : void
840  {
841  $this->edit_by_owner = $edit_by_owner;
842  if ($edit_by_owner) {
843  $this->setEditPerm(true);
844  }
845  }
setEditPerm(bool $edit_perm)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setEditPerm()

ilDclTable::setEditPerm ( bool  $edit_perm)

Definition at line 865 of file class.ilDclTable.php.

References $edit_perm, and setEditByOwner().

Referenced by cloneStructure(), doRead(), and setEditByOwner().

865  : void
866  {
867  $this->edit_perm = $edit_perm;
868  if (!$edit_perm) {
869  $this->setEditByOwner(false);
870  }
871  }
setEditByOwner(bool $edit_by_owner)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setExportEnabled()

ilDclTable::setExportEnabled ( bool  $export_enabled)

Definition at line 1132 of file class.ilDclTable.php.

References $export_enabled.

Referenced by cloneStructure(), and doRead().

1132  : void
1133  {
1134  $this->export_enabled = $export_enabled;
1135  }
+ Here is the caller graph for this function:

◆ setId()

ilDclTable::setId ( int  $a_id)

Set table id.

Definition at line 255 of file class.ilDclTable.php.

Referenced by doCreate().

255  : void
256  {
257  $this->id = $a_id;
258  }
+ Here is the caller graph for this function:

◆ setImportEnabled()

ilDclTable::setImportEnabled ( bool  $import_enabled)

Definition at line 1169 of file class.ilDclTable.php.

References $import_enabled.

Referenced by cloneStructure(), and doRead().

1169  : void
1170  {
1171  $this->import_enabled = $import_enabled;
1172  }
+ Here is the caller graph for this function:

◆ setIsVisible()

ilDclTable::setIsVisible ( bool  $is_visible)

Definition at line 908 of file class.ilDclTable.php.

References $is_visible.

Referenced by cloneStructure(), and doRead().

908  : void
909  {
910  $this->is_visible = $is_visible;
911  }
+ Here is the caller graph for this function:

◆ setLimited()

ilDclTable::setLimited ( bool  $limited)

Definition at line 878 of file class.ilDclTable.php.

References $limited.

Referenced by cloneStructure(), and doRead().

878  : void
879  {
880  $this->limited = $limited;
881  }
+ Here is the caller graph for this function:

◆ setLimitEnd()

ilDclTable::setLimitEnd ( string  $limit_end)

Definition at line 888 of file class.ilDclTable.php.

References $limit_end.

Referenced by cloneStructure(), and doRead().

888  : void
889  {
890  $this->limit_end = $limit_end;
891  }
+ Here is the caller graph for this function:

◆ setLimitStart()

ilDclTable::setLimitStart ( string  $limit_start)

Definition at line 898 of file class.ilDclTable.php.

References $limit_start.

Referenced by cloneStructure(), and doRead().

898  : void
899  {
900  $this->limit_start = $limit_start;
901  }
string $limit_start
+ Here is the caller graph for this function:

◆ setObjId()

ilDclTable::setObjId ( int  $a_id)

Definition at line 268 of file class.ilDclTable.php.

Referenced by doRead().

268  : void
269  {
270  $this->objId = $a_id;
271  }
+ Here is the caller graph for this function:

◆ setOrder()

ilDclTable::setOrder ( int  $table_order)

Definition at line 1164 of file class.ilDclTable.php.

References $table_order.

Referenced by cloneStructure(), and doRead().

1164  : void
1165  {
1166  $this->table_order = $table_order;
1167  }
+ Here is the caller graph for this function:

◆ setPublicCommentsEnabled()

ilDclTable::setPublicCommentsEnabled ( bool  $public_comments)

Definition at line 952 of file class.ilDclTable.php.

References $public_comments.

Referenced by cloneStructure(), and doRead().

952  : void
953  {
954  $this->public_comments = $public_comments;
955  }
bool $public_comments
True if users can add comments on each record of this table.
+ Here is the caller graph for this function:

◆ setSaveConfirmation()

ilDclTable::setSaveConfirmation ( bool  $save_confirmation)

Definition at line 977 of file class.ilDclTable.php.

References $save_confirmation.

Referenced by cloneStructure(), and doRead().

977  : void
978  {
979  $this->save_confirmation = $save_confirmation;
980  }
bool $save_confirmation
+ Here is the caller graph for this function:

◆ setTitle()

ilDclTable::setTitle ( string  $a_title)

Definition at line 278 of file class.ilDclTable.php.

Referenced by cloneStructure(), and doRead().

278  : void
279  {
280  $this->title = $a_title;
281  }
+ Here is the caller graph for this function:

◆ setViewOwnRecordsPerm()

ilDclTable::setViewOwnRecordsPerm ( bool  $view_own_perm)

Definition at line 962 of file class.ilDclTable.php.

References ILIAS\Repository\int().

Referenced by cloneStructure(), and doRead().

962  : void
963  {
964  $this->view_own_records_perm = (int) $view_own_perm;
965  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showInvalidFields()

ilDclTable::showInvalidFields ( bool  $value)

Definition at line 1315 of file class.ilDclTable.php.

1315  : void
1316  {
1317  $this->show_invalid = $value;
1318  }

◆ sortByOrder()

ilDclTable::sortByOrder ( array &  $array)
protected
Parameters
ilDclBaseFieldModel[]$array the array to sort

Definition at line 774 of file class.ilDclTable.php.

Referenced by buildOrderFields(), reloadFields(), and sortFields().

774  : void
775  {
776  // php-bug: https://bugs.php.net/bug.php?id=50688
777  // fixed in php 7 but for now we need the @ a workaround
778  usort($array, [$this, "compareOrder"]);
779  }
+ Here is the caller graph for this function:

◆ sortFields()

ilDclTable::sortFields ( array &  $fields)

sortFields

Parameters
ilDclBaseFieldModel[]$fields

Definition at line 759 of file class.ilDclTable.php.

References sortByOrder().

759  : void
760  {
761  $this->sortByOrder($fields);
762  //After sorting the array loses it's keys respectivly their keys are set form $field->id to 1,2,3... so we reset the keys.
763  $named = [];
764  foreach ($fields as $field) {
765  $named[$field->getId()] = $field;
766  }
767 
768  $fields = $named;
769  }
sortByOrder(array &$array)
+ Here is the call graph for this function:

◆ sortTableViews()

ilDclTable::sortTableViews ( array  $tableviews = null)
Parameters
ilDclTableView[]$tableviews

Definition at line 435 of file class.ilDclTable.php.

References getTableViews().

435  : void
436  {
437  if ($tableviews == null) {
438  $tableviews = $this->getTableViews();
439  }
440 
441  $order = 10;
442  foreach ($tableviews as $tableview) {
443  $tableview->setTableviewOrder($order);
444  $tableview->update();
445  $order += 10;
446  }
447  }
+ Here is the call graph for this function:

◆ updateFields()

ilDclTable::updateFields ( )

Update fields.

Definition at line 748 of file class.ilDclTable.php.

References getFields().

748  : void
749  {
750  foreach ($this->getFields() as $field) {
751  $field->doUpdate();
752  }
753  }
getFields()
Returns all fields of this table including the standard fields.
+ Here is the call graph for this function:

◆ updateOrder()

ilDclTable::updateOrder ( )

Definition at line 1151 of file class.ilDclTable.php.

References getId().

Referenced by getOrder().

1151  : void
1152  {
1153  $result = $this->db->query('SELECT MAX(table_order) AS table_order FROM il_dcl_table WHERE obj_id = ' . $this->db->quote(
1154  $this->getCollectionObject()->getId(),
1155  'integer'
1156  ));
1157  $this->table_order = $this->db->fetchObject($result)->table_order + 10;
1158  $this->db->query('UPDATE il_dcl_table SET table_order = ' . $this->db->quote(
1159  $this->table_order,
1160  'integer'
1161  ) . ' WHERE id = ' . $this->db->quote($this->getId(), 'integer'));
1162  }
getId()
Get table id.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $add_perm

bool ilDclTable::$add_perm = false
protected

Definition at line 44 of file class.ilDclTable.php.

Referenced by getAddPerm(), and setAddPerm().

◆ $all_fields

array ilDclTable::$all_fields = null
protected

table fields and std fields combined

Definition at line 77 of file class.ilDclTable.php.

Referenced by getFields().

◆ $db

ilDBInterface ilDclTable::$db
protected

Definition at line 81 of file class.ilDclTable.php.

◆ $default_sort_field

string ilDclTable::$default_sort_field = "0"
protected

Definition at line 57 of file class.ilDclTable.php.

Referenced by getDefaultSortField(), and setDefaultSortField().

◆ $default_sort_field_order

string ilDclTable::$default_sort_field_order = 'asc'
protected

Default sort-order (asc|desc)

Definition at line 61 of file class.ilDclTable.php.

Referenced by getDefaultSortFieldOrder(), and setDefaultSortFieldOrder().

◆ $delete_by_owner

bool ilDclTable::$delete_by_owner = false
protected

Definition at line 48 of file class.ilDclTable.php.

Referenced by getDeleteByOwner(), and setDeleteByOwner().

◆ $delete_perm

bool ilDclTable::$delete_perm = false
protected

Definition at line 46 of file class.ilDclTable.php.

Referenced by getDeletePerm(), and setDeletePerm().

◆ $description

string ilDclTable::$description = ''
protected

Description for this table displayed above records.

Definition at line 65 of file class.ilDclTable.php.

Referenced by getDescription(), and setDescription().

◆ $edit_by_owner

bool ilDclTable::$edit_by_owner = false
protected

Definition at line 47 of file class.ilDclTable.php.

Referenced by getEditByOwner(), and setEditByOwner().

◆ $edit_perm

bool ilDclTable::$edit_perm = false
protected

Definition at line 45 of file class.ilDclTable.php.

Referenced by getEditPerm(), and setEditPerm().

◆ $export_enabled

bool ilDclTable::$export_enabled = false
protected

Definition at line 53 of file class.ilDclTable.php.

Referenced by getExportEnabled(), and setExportEnabled().

◆ $fields

array ilDclTable::$fields = []
protected

◆ $http

ILIAS HTTP Services ilDclTable::$http
protected

Definition at line 78 of file class.ilDclTable.php.

◆ $id

int ilDclTable::$id = 0
protected

Definition at line 27 of file class.ilDclTable.php.

Referenced by _getTableIdByTitle(), getId(), and getPartialRecords().

◆ $import_enabled

bool ilDclTable::$import_enabled = false
protected

Definition at line 55 of file class.ilDclTable.php.

Referenced by getImportEnabled(), and setImportEnabled().

◆ $is_visible

bool ilDclTable::$is_visible = false
protected

Definition at line 43 of file class.ilDclTable.php.

Referenced by getIsVisible(), and setIsVisible().

◆ $limit_end

string ilDclTable::$limit_end = ""
protected

Definition at line 52 of file class.ilDclTable.php.

Referenced by getLimitEnd(), and setLimitEnd().

◆ $limit_start

string ilDclTable::$limit_start = ""
protected

Definition at line 51 of file class.ilDclTable.php.

Referenced by getLimitStart(), and setLimitStart().

◆ $limited

bool ilDclTable::$limited = false
protected

Definition at line 50 of file class.ilDclTable.php.

Referenced by getLimited(), and setLimited().

◆ $obj

ilObjDataCollection ilDclTable::$obj = null
protected

Definition at line 29 of file class.ilDclTable.php.

Referenced by getCollectionObject().

◆ $objId

int ilDclTable::$objId = null
protected

Definition at line 28 of file class.ilDclTable.php.

Referenced by getObjId().

◆ $public_comments

bool ilDclTable::$public_comments = false
protected

True if users can add comments on each record of this table.

Definition at line 69 of file class.ilDclTable.php.

Referenced by getPublicCommentsEnabled(), and setPublicCommentsEnabled().

◆ $records

array ilDclTable::$records = []
protected

Definition at line 42 of file class.ilDclTable.php.

Referenced by getPartialRecords(), getRecords(), and loadRecords().

◆ $refinery

ILIAS Refinery Factory ilDclTable::$refinery
protected

Definition at line 79 of file class.ilDclTable.php.

◆ $save_confirmation

bool ilDclTable::$save_confirmation = false
protected

Definition at line 49 of file class.ilDclTable.php.

Referenced by getSaveConfirmation(), and setSaveConfirmation().

◆ $show_invalid

bool ilDclTable::$show_invalid = false
protected

Definition at line 82 of file class.ilDclTable.php.

◆ $stdFields

array ilDclTable::$stdFields = []
protected

Definition at line 38 of file class.ilDclTable.php.

Referenced by getFieldsForFormula().

◆ $table_order

int ilDclTable::$table_order = 0
protected

Definition at line 54 of file class.ilDclTable.php.

Referenced by getOrder(), and setOrder().

◆ $title

string ilDclTable::$title = ""
protected

Definition at line 30 of file class.ilDclTable.php.

Referenced by getFieldByTitle(), and getTitle().

◆ $user

ilObjUser ilDclTable::$user
protected

Definition at line 80 of file class.ilDclTable.php.

◆ $view_own_records_perm

int ilDclTable::$view_own_records_perm = 0
protected

True if user can only view his/her own entries in the table.

Definition at line 73 of file class.ilDclTable.php.

Referenced by getViewOwnRecordsPerm().


The documentation for this class was generated from the following file: