ILIAS  release_8 Revision v8.24
ilDclTable Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ 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 $ref_id, bool $with_active_detailedview=false, int $user_id=0)
 For current user. More...
 
 getFirstTableViewId (int $ref_id, int $user_id=0, bool $with_detailed_view=false)
 get id of first (for current user) available view More...
 
 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 ()
 hasCustomFields More...
 
 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 = null
 
string $limit_end = null
 
bool $export_enabled = false
 
int $table_order = 0
 
bool $import_enabled = false
 
 $default_sort_field = 0
 ID of the default sorting field. More...
 
string $default_sort_field_order = 'asc'
 Default sort-order (asc|desc) More...
 
string $description = ''
 Description for this table displayed above records. More...
 
int $public_comments = 0
 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

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning

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

Constructor & Destructor Documentation

◆ __construct()

ilDclTable::__construct ( int  $a_id = 0)

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

82 {
83 global $DIC;
84
85 $this->http = $DIC->http();
86 $this->refinery = $DIC->refinery();
87 $this->db = $DIC->database();
88 $this->user = $DIC->user();
89
90 if ($a_id != 0) {
91 $this->id = $a_id;
92 $this->doRead();
93 }
94 }
doRead()
Read table.
global $DIC
Definition: feed.php:28
static http()
Fetches the global http state from ILIAS.

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

+ 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 1114 of file class.ilDclTable.php.

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

References $DIC, $id, $ilDB, and $title.

Referenced by ilObjDataCollection\reorderTables().

+ Here is the caller graph for this function:

◆ _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 1183 of file class.ilDclTable.php.

1183 : bool
1184 {
1185 global $DIC;
1186 $ilDB = $DIC['ilDB'];
1187 $result = $ilDB->query(
1188 'SELECT * FROM il_dcl_field WHERE table_id = ' . $ilDB->quote($obj_id, 'integer') . ' AND title = '
1189 . $ilDB->quote($title, 'text')
1190 );
1191
1192 return (bool) $ilDB->numRows($result);
1193 }

References $DIC, $ilDB, and $title.

Referenced by ilDclFieldEditGUI\checkInput().

+ Here is the caller graph for this function:

◆ _hasRecords()

ilDclTable::_hasRecords ( )

_hasRecords

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

1084 : bool
1085 {
1086 return count($this->getRecords()) > 0;
1087 }

References getRecords().

+ 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 1100 of file class.ilDclTable.php.

1100 : bool
1101 {
1102 global $DIC;
1103 $ilDB = $DIC['ilDB'];
1104
1105 $query = "SELECT * FROM il_dcl_table WHERE id = " . $table_id;
1106 $result = $ilDB->query($query);
1107
1108 return $result->numRows() != 0;
1109 }
$query

References $DIC, $ilDB, and $query.

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

+ 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 1092 of file class.ilDclTable.php.

1092 : void
1093 {
1094 $this->all_fields[$field->getId()] = $field;
1095 }

References ilDclBaseFieldModel\getId().

+ Here is the call graph for this function:

◆ afterClone()

ilDclTable::afterClone ( )

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

1074 : void
1075 {
1076 foreach ($this->getFields() as $field) {
1077 $field->afterClone($this->getRecords());
1078 }
1079 }
getFields()
Returns all fields of this table including the standard fields.

References getFields(), and getRecords().

+ Here is the call graph for this function:

◆ buildOrderFields()

ilDclTable::buildOrderFields ( )

buildOrderFields orders the fields.

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

777 : void
778 {
779 $fields = $this->getFields();
780 $this->sortByOrder($fields);
781 $count = 10;
782 $offset = 10;
783 foreach ($fields as $field) {
784 if (!is_null($field->getOrder())) {
785 $field->setOrder($count);
786 $count = $count + $offset;
787 $field->doUpdate();
788 }
789 }
790 }
sortByOrder(array &$array)

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

Referenced by doCreate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkLimit()

ilDclTable::checkLimit ( )

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

724 : bool
725 {
726 if ($this->getLimited()) {
727 $now = new ilDateTime(date("Y-m-d H:i:s"), IL_CAL_DATE);
728 $from = new ilDateTime($this->getLimitStart(), IL_CAL_DATE);
729 $to = new ilDateTime($this->getLimitEnd(), IL_CAL_DATE);
730
731 return ($from <= $now && $now <= $to);
732 }
733
734 return true;
735 }
const IL_CAL_DATE
@classDescription Date and time handling

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

Referenced by hasPermissionToDeleteRecord(), and hasPermissionToEditRecord().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ cloneStructure()

ilDclTable::cloneStructure ( ilDclTable  $original)

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

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

References $default_sort_field, doCreate(), doUpdate(), getAddPerm(), getDefaultSortField(), getDefaultSortFieldOrder(), getDeleteByOwner(), getDeletePerm(), getDescription(), getEditByOwner(), getEditPerm(), getExportEnabled(), ilDclReferenceFieldModel\getFieldRef(), 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.

+ Here is the call graph for this function:

◆ compareOrder()

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

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

985 : int
986 {
987 if (is_null($a->getOrder() == null) && is_null($b->getOrder() == null)) {
988 return 0;
989 }
990 if (is_null($a->getOrder())) {
991 return 1;
992 }
993 if (is_null($b->getOrder())) {
994 return -1;
995 }
996
997 return $a->getOrder() < $b->getOrder() ? -1 : 1;
998 }
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples

References Vendor\Package\$a, and Vendor\Package\$b.

◆ deleteField()

ilDclTable::deleteField ( int  $field_id)

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

334 : void
335 {
336 $field = ilDclCache::getFieldCache($field_id);
337 $records = $this->getRecords();
338
339 foreach ($records as $record) {
340 $record->deleteField($field_id);
341 }
342
343 $field->doDelete();
344 }
static getFieldCache(int $field_id=0)

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

+ Here is the call graph for this function:

◆ doCreate()

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

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

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

References $id, $query, 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().

+ 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 140 of file class.ilDclTable.php.

140 : void
141 {
142 foreach ($this->getRecords() as $record) {
143 $record->doDelete($omit_notification);
144 }
145
146 foreach ($this->getRecordFields() as $field) {
147 $field->doDelete();
148 }
149
150 // // SW: Fix #12794 und #11405
151 // // Problem is that when the DC object gets deleted, $this::getCollectionObject() tries to load the DC but it's not in the DB anymore
152 // // If $delete_main_table is true, avoid getting the collection object
153 // $exec_delete = false;
154 // if ($delete_main_table) {
155 // $exec_delete = true;
156 // }
157 // if (!$exec_delete && $this->getCollectionObject()->getFirstVisibleTableId() != $this->getId()) {
158 // $exec_delete = true;
159 // }
160 if (!$delete_only_content) {
161 $query = "DELETE FROM il_dcl_table WHERE id = " . $this->db->quote($this->getId(), "integer");
162 $this->db->manipulate($query);
163 }
164 }
getRecordFields()
Returns all fields of this table which are NOT standard fields.

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

+ Here is the call graph for this function:

◆ doesRecordBelongToUser()

ilDclTable::doesRecordBelongToUser ( ilDclBaseRecordModel  $record)
protected

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

719 : bool
720 {
721 return ($this->user->getId() == $record->getOwner());
722 }

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

Referenced by hasPermissionToDeleteRecord(), and hasPermissionToEditRecord().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ doRead()

ilDclTable::doRead ( )

Read table.

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

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

References $query, 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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ doUpdate()

ilDclTable::doUpdate ( )

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

227 : void
228 {
229 $this->db->update(
230 "il_dcl_table",
231 [
232 "obj_id" => ["integer", $this->getObjId()],
233 "title" => ["text", $this->getTitle()],
234 "add_perm" => ["integer", (int) $this->getAddPerm()],
235 "edit_perm" => ["integer", (int) $this->getEditPerm()],
236 "delete_perm" => ["integer", (int) $this->getDeletePerm()],
237 "edit_by_owner" => ["integer", (int) $this->getEditByOwner()],
238 "limited" => ["integer", $this->getLimited()],
239 "limit_start" => ["timestamp", $this->getLimitStart()],
240 "limit_end" => ["timestamp", $this->getLimitEnd()],
241 "is_visible" => ["integer", $this->getIsVisible() ? 1 : 0],
242 "export_enabled" => ["integer", $this->getExportEnabled() ? 1 : 0],
243 "import_enabled" => ["integer", $this->getImportEnabled() ? 1 : 0],
244 "description" => ["text", $this->getDescription()],
245 "default_sort_field_id" => ["text", $this->getDefaultSortField()],
246 "default_sort_field_order" => ["text", $this->getDefaultSortFieldOrder()],
247 "public_comments" => ["integer", $this->getPublicCommentsEnabled() ? 1 : 0],
248 "view_own_records_perm" => ["integer", $this->getViewOwnRecordsPerm()],
249 'delete_by_owner' => ['integer', $this->getDeleteByOwner() ? 1 : 0],
250 'save_confirmation' => ['integer', $this->getSaveConfirmation() ? 1 : 0],
251 'table_order' => ['integer', $this->getOrder()],
252 ],
253 [
254 "id" => ["integer", $this->getId()],
255 ]
256 );
257 }

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAddPerm()

ilDclTable::getAddPerm ( )

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

813 : bool
814 {
815 return $this->add_perm;
816 }

References $add_perm.

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

+ Here is the caller graph for this function:

◆ getCollectionObject()

ilDclTable::getCollectionObject ( )

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

296 {
297 $this->loadObj();
298
299 return $this->obj;
300 }
ilObjDataCollection $obj
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References $obj, and loadObj().

+ Here is the call graph for this function:

◆ getCustomFields()

ilDclTable::getCustomFields ( )
Returns
ilDclBaseFieldModel[]

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

408 : array
409 {
410 if (!$this->fields) {
411 $this->loadCustomFields();
412 }
413
414 return $this->fields;
415 }
$errors fields
Definition: imgupload.php:67

References $fields, fields, and loadCustomFields().

+ Here is the call graph for this function:

◆ getDefaultSortField()

ilDclTable::getDefaultSortField ( )

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

926 : string
927 {
929 }

References $default_sort_field.

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

+ Here is the caller graph for this function:

◆ getDefaultSortFieldOrder()

ilDclTable::getDefaultSortFieldOrder ( )

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

939 : string
940 {
942 }
string $default_sort_field_order
Default sort-order (asc|desc)

References $default_sort_field_order.

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

+ Here is the caller graph for this function:

◆ getDeleteByOwner()

ilDclTable::getDeleteByOwner ( )

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

844 : bool
845 {
847 }

References $delete_by_owner.

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

+ Here is the caller graph for this function:

◆ getDeletePerm()

ilDclTable::getDeletePerm ( )

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

826 : bool
827 {
828 return $this->delete_perm;
829 }

References $delete_perm.

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

+ Here is the caller graph for this function:

◆ getDescription()

ilDclTable::getDescription ( )

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

915 : string
916 {
917 return $this->description;
918 }
string $description
Description for this table displayed above records.

References $description.

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

+ Here is the caller graph for this function:

◆ getEditableFields()

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

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

590 : array
591 {
592 $fields = $this->getRecordFields();
593 $editableFields = [];
594
595 foreach ($fields as $field) {
596 $tableview_id = $this->http->wrapper()->post()->retrieve(
597 'tableview_id',
598 $this->refinery->kindlyTo()->int()
599 );
600 if (!$field->getViewSetting($tableview_id)->isLocked($creation_mode)) {
601 $editableFields[] = $field;
602 }
603 }
604
605 return $editableFields;
606 }

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

+ Here is the call graph for this function:

◆ getEditByOwner()

ilDclTable::getEditByOwner ( )

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

839 : bool
840 {
842 }

References $edit_by_owner.

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

+ Here is the caller graph for this function:

◆ getEditPerm()

ilDclTable::getEditPerm ( )

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

865 : bool
866 {
867 return $this->edit_perm;
868 }

References $edit_perm.

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

+ 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 612 of file class.ilDclTable.php.

612 : array
613 {
614 $fields = $this->getFields();
615 $exportableFields = [];
616 foreach ($fields as $field) {
617 if ($field->getExportable()) {
618 $exportableFields[] = $field;
619 }
620 }
621
622 return $exportableFields;
623 }

References $fields, and getFields().

+ Here is the call graph for this function:

◆ getExportEnabled()

ilDclTable::getExportEnabled ( )

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

1136 : bool
1137 {
1138 return $this->export_enabled;
1139 }

References $export_enabled.

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

+ Here is the caller graph for this function:

◆ getField()

ilDclTable::getField ( string  $field_id)

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

347 {
348 $fields = $this->getFields();
349 $field = null;
350 foreach ($fields as $field_1) {
351 if ($field_1->getId() == $field_id) {
352 $field = $field_1;
353 }
354 }
355
356 return $field;
357 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References $fields, and getFields().

+ Here is the call graph for this function:

◆ getFieldByTitle()

ilDclTable::getFieldByTitle ( string  $title)

Get a field by title.

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

796 {
797 $return = null;
798 foreach ($this->getFields() as $field) {
799 if ($field->getTitle() == $title) {
800 $return = $field;
801 break;
802 }
803 }
804
805 return $return;
806 }

References $title, and getFields().

+ Here is the call graph for this function:

◆ getFieldIds()

ilDclTable::getFieldIds ( )
Returns
int[]

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

362 : array
363 {
364 $field_ids = [];
365 foreach ($this->getFields() as $field) {
366 if ($field->getId()) {
367 $field_ids[] = $field->getId();
368 }
369 }
370
371 return $field_ids;
372 }

References getFields().

+ 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 464 of file class.ilDclTable.php.

464 : array
465 {
466 if ($this->all_fields == null) {
467 $this->reloadFields();
468 }
469
470 return $this->all_fields;
471 }
array $all_fields
table fields and std fields combined

References $all_fields, and reloadFields().

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

+ 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 530 of file class.ilDclTable.php.

530 : array
531 {
532 $syntax_chars = array_merge(
535 ['(', ')', ',']
536 );
537 foreach ($this->getFields() as $field) {
538 if (in_array($field->getDatatypeId(), ilDclFormulaFieldModel::SUPPORTED_FIELDS)) {
539 foreach ($syntax_chars as $element) {
540 if (str_contains($field->getTitle(), $element)) {
541 continue 2;
542 }
543 }
544 $return[] = $field;
545 }
546 }
547
548 return $return;
549 }

References getFields(), ilDclExpressionParser\getFunctions(), ilDclExpressionParser\getOperators(), and ilDclFormulaFieldModel\SUPPORTED_FIELDS.

+ Here is the call graph for this function:

◆ getFirstTableViewId()

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

get id of first (for current user) available view

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

517 : ?int
518 {
519 $uid = $user_id;
520 $array = $this->getVisibleTableViews($ref_id, $with_detailed_view, $uid);
521 $tableview = array_shift($array);
522
523 return $tableview ? $tableview->getId() : false;
524 }
getVisibleTableViews(int $ref_id, bool $with_active_detailedview=false, int $user_id=0)
For current user.
$ref_id
Definition: ltiauth.php:67

References getVisibleTableViews().

+ Here is the call graph for this function:

◆ getId()

ilDclTable::getId ( )

◆ getImportEnabled()

ilDclTable::getImportEnabled ( )

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

1173 : bool
1174 {
1175 return $this->import_enabled;
1176 }

References $import_enabled.

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

+ Here is the caller graph for this function:

◆ getIsVisible()

ilDclTable::getIsVisible ( )

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

905 : bool
906 {
907 return $this->is_visible;
908 }

References $is_visible.

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

+ Here is the caller graph for this function:

◆ getLimited()

ilDclTable::getLimited ( )

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

875 : bool
876 {
877 return $this->limited;
878 }

References $limited.

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

+ Here is the caller graph for this function:

◆ getLimitEnd()

ilDclTable::getLimitEnd ( )

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

885 : ?string
886 {
887 return $this->limit_end;
888 }

References $limit_end.

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

+ Here is the caller graph for this function:

◆ getLimitStart()

ilDclTable::getLimitStart ( )

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

895 : ?string
896 {
897 return $this->limit_start;
898 }
string $limit_start

References $limit_start.

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

+ 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 421 of file class.ilDclTable.php.

421 : int
422 {
423 $fields = $this->getFields();
424 $place = 0;
425 foreach ($fields as $field) {
426 if (!$field->isStandardField()) {
427 $place = $field->getOrder() + 1;
428 }
429 }
430
431 return $place;
432 }

References $fields, and getFields().

+ Here is the call graph for this function:

◆ getNewTableviewOrder()

ilDclTable::getNewTableviewOrder ( )
Returns
int

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

437 : int
438 {
439 return (ilDclTableView::getCountForTableId($this->getId()) + 1) * 10;
440 }
static getCountForTableId(int $table_id)

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

+ Here is the call graph for this function:

◆ getObjId()

ilDclTable::getObjId ( )

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

280 : ?int
281 {
282 return $this->objId;
283 }

References $objId.

Referenced by doCreate(), doUpdate(), hasPermissionToDeleteRecord(), hasPermissionToDeleteRecords(), hasPermissionToEditRecord(), hasPermissionToViewRecord(), and ilObjDataCollectionAccess\isTableInDataCollection().

+ Here is the caller graph for this function:

◆ getOrder()

ilDclTable::getOrder ( )

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

1141 : int
1142 {
1143 if (!$this->table_order) {
1144 $this->updateOrder();
1145 }
1146
1147 return $this->table_order;
1148 }

References $table_order, and updateOrder().

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

+ 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 1204 of file class.ilDclTable.php.

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

Referenced by ilDclRecordListGUI\getRecordListTableGUI().

+ Here is the caller graph for this function:

◆ getPublicCommentsEnabled()

ilDclTable::getPublicCommentsEnabled ( )

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

949 : bool
950 {
952 }
int $public_comments
True if users can add comments on each record of this table.

References $public_comments.

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

+ 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 579 of file class.ilDclTable.php.

579 : array
580 {
581 $this->loadCustomFields();
582
583 return $this->fields;
584 }

References $fields, and loadCustomFields().

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getRecords()

ilDclTable::getRecords ( )
Returns
ilDclBaseRecordModel[]

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

312 : array
313 {
314 if ($this->records == null) {
315 $this->loadRecords();
316 }
317
318 return $this->records;
319 }

References $records, and loadRecords().

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSaveConfirmation()

ilDclTable::getSaveConfirmation ( )

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

964 : bool
965 {
967 }
bool $save_confirmation

References $save_confirmation.

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

+ Here is the caller graph for this function:

◆ getTableViews()

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

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

487 : array
488 {
490 }
static getAllForTableId(int $table_id)

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

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTitle()

ilDclTable::getTitle ( )

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

290 : string
291 {
292 return $this->title;
293 }

References $title.

Referenced by cloneStructure(), ilDclTableEditGUI\createTableSwitcher(), doCreate(), doUpdate(), ilDclTableListTableGUI\fillRowFromObject(), and ilDclTableViewGUI\show().

+ Here is the caller graph for this function:

◆ getViewOwnRecordsPerm()

ilDclTable::getViewOwnRecordsPerm ( )

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

959 : bool
960 {
961 return (bool) $this->view_own_records_perm;
962 }
int $view_own_records_perm
True if user can only view his/her own entries in the table.

References $view_own_records_perm.

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

+ Here is the caller graph for this function:

◆ getVisibleTableViews()

ilDclTable::getVisibleTableViews ( int  $ref_id,
bool  $with_active_detailedview = false,
int  $user_id = 0 
)

For current user.

Returns
ilDclTableView[]

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

496 : array
497 {
498 if (ilObjDataCollectionAccess::hasWriteAccess($ref_id, $user_id) && !$with_active_detailedview) {
499 return $this->getTableViews();
500 }
501
502 $visible_views = [];
503 foreach ($this->getTableViews() as $tableView) {
504 if (ilObjDataCollectionAccess::hasAccessToTableView($tableView, $user_id)) {
505 if (!$with_active_detailedview || ilDclDetailedViewDefinition::isActive($tableView->getId())) {
506 $visible_views[] = $tableView;
507 }
508 }
509 }
510
511 return $visible_views;
512 }
static hasAccessToTableView($tableview, ?int $user_id=0)
This only checks access to the tableview - if the full access check is required, use hasAccessTo($ref...

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

Referenced by getFirstTableViewId().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ hasCustomFields()

ilDclTable::hasCustomFields ( )

hasCustomFields

Returns
boolean

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

978 : bool
979 {
980 $this->loadCustomFields();
981
982 return count($this->fields) > 0;
983 }

References fields, and loadCustomFields().

+ 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 658 of file class.ilDclTable.php.

658 : bool
659 {
661 return false;
662 }
664 return true;
665 }
667 return false;
668 }
669 if (!$this->checkLimit()) {
670 return false;
671 }
672 if ($this->getDeletePerm() && !$this->getDeleteByOwner()) {
673 return true;
674 }
675 if ($this->getDeleteByOwner()) {
676 return $this->doesRecordBelongToUser($record);
677 }
678
679 return false;
680 }
doesRecordBelongToUser(ilDclBaseRecordModel $record)
static hasAddRecordAccess(int $ref, ?int $user_id=0)
static _lookupObjectId(int $ref_id)

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

+ Here is the call graph for this function:

◆ hasPermissionToDeleteRecords()

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

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

686 : bool
687 {
689 return false;
690 }
691
694 }

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

+ 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 630 of file class.ilDclTable.php.

630 : bool
631 {
633 return false;
634 }
636 return true;
637 }
639 return false;
640 }
641 if (!$this->checkLimit()) {
642 return false;
643 }
644 if ($this->getEditPerm() && !$this->getEditByOwner()) {
645 return true;
646 }
647 if ($this->getEditByOwner()) {
648 return $this->doesRecordBelongToUser($record);
649 }
650
651 return false;
652 }

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

+ Here is the call graph for this function:

◆ hasPermissionToViewRecord()

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

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

696 : bool
697 {
699 return false;
700 }
702 $ref_id,
703 $user_id
705 return true;
706 }
708 // Check for view only own entries setting
709 if ($this->getViewOwnRecordsPerm() && ($user_id ?: $this->user->getId()) != $record->getOwner()) {
710 return false;
711 }
712
713 return true;
714 }
715
716 return false;
717 }
static hasReadAccess(int $ref, ?int $user_id=0)

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

+ Here is the call graph for this function:

◆ loadCustomFields()

ilDclTable::loadCustomFields ( )
protected

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

374 : void
375 {
376 if (!$this->fields) {
377 $query
378 = "SELECT DISTINCT il_dcl_field.*, il_dcl_tfield_set.field_order
379 FROM il_dcl_field
380 INNER JOIN il_dcl_tfield_set
381 ON ( il_dcl_tfield_set.field NOT IN ('owner',
382 'last_update',
383 'last_edit_by',
384 'id',
385 'create_date')
386 AND il_dcl_tfield_set.table_id = il_dcl_field.table_id
387 AND il_dcl_tfield_set.field = " . $this->db->cast("il_dcl_field.id", "text") . ")
388 WHERE il_dcl_field.table_id = %s
389 ORDER BY il_dcl_tfield_set.field_order ASC";
390
391 $set = $this->db->queryF($query, ['integer'], [$this->getId()]);
392 $fields = [];
393 while ($rec = $this->db->fetchAssoc($set)) {
395 if ($this->show_invalid || in_array($field->getDatatypeId(), array_keys(ilDclDatatype::getAllDatatype()))) {
396 $fields[] = $field;
397 }
398 }
399 $this->fields = $fields;
400
402 }
403 }
static buildFieldFromRecord(array $rec)
static preloadFieldProperties(array $fields)
Preloads field properties.
static getAllDatatype(bool $force=false)
Get all possible Datatypes.

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

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ loadObj()

ilDclTable::loadObj ( )
protected

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

302 : void
303 {
304 if ($this->obj == null) {
305 $this->obj = new ilObjDataCollection($this->objId, false);
306 }
307 }

Referenced by getCollectionObject().

+ Here is the caller graph for this function:

◆ loadRecords()

ilDclTable::loadRecords ( )

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

321 : void
322 {
323 $records = [];
324 $query = "SELECT id FROM il_dcl_record WHERE table_id = " . $this->db->quote($this->id, "integer");
325 $set = $this->db->query($query);
326
327 while ($rec = $this->db->fetchAssoc($set)) {
328 $records[$rec['id']] = ilDclCache::getRecordCache($rec['id']);
329 }
330
331 $this->records = $records;
332 }

References $query, $records, and ilDclCache\getRecordCache().

Referenced by getRecords().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ reloadFields()

ilDclTable::reloadFields ( )

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

473 : void
474 {
475 $this->loadCustomFields();
476 $this->stdFields = $this->getStandardFields();
477 $fields = array_merge($this->fields, $this->stdFields);
478
479 $this->sortByOrder($fields);
480
481 $this->all_fields = $fields;
482 }

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

Referenced by getFields().

+ 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 808 of file class.ilDclTable.php.

808 : void
809 {
810 $this->add_perm = $add_perm;
811 }

References $add_perm.

Referenced by cloneStructure(), and doRead().

+ Here is the caller graph for this function:

◆ setDefaultSortField()

ilDclTable::setDefaultSortField ( string  $default_sort_field)

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

920 : void
921 {
922 $default_sort_field = ($default_sort_field) ?: 0; // Change null or empty strings to zero
923 $this->default_sort_field = $default_sort_field;
924 }

References $default_sort_field.

Referenced by cloneStructure(), and doRead().

+ Here is the caller graph for this function:

◆ setDefaultSortFieldOrder()

ilDclTable::setDefaultSortFieldOrder ( string  $default_sort_field_order)

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

931 : void
932 {
933 if (!in_array($default_sort_field_order, ['asc', 'desc'])) {
935 }
936 $this->default_sort_field_order = $default_sort_field_order;
937 }

References $default_sort_field_order.

Referenced by cloneStructure(), and doRead().

+ Here is the caller graph for this function:

◆ setDeleteByOwner()

ilDclTable::setDeleteByOwner ( bool  $delete_by_owner)

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

849 : void
850 {
851 $this->delete_by_owner = $delete_by_owner;
852 if ($delete_by_owner) {
853 $this->setDeletePerm(true);
854 }
855 }

References $delete_by_owner, and setDeletePerm().

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

+ 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 818 of file class.ilDclTable.php.

818 : void
819 {
820 $this->delete_perm = $delete_perm;
821 if (!$delete_perm) {
822 $this->setDeleteByOwner(false);
823 }
824 }

References $delete_perm, and setDeleteByOwner().

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setDescription()

ilDclTable::setDescription ( string  $description)

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

910 : void
911 {
912 $this->description = $description;
913 }

References $description.

Referenced by cloneStructure(), and doRead().

+ Here is the caller graph for this function:

◆ setEditByOwner()

ilDclTable::setEditByOwner ( bool  $edit_by_owner)

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

831 : void
832 {
833 $this->edit_by_owner = $edit_by_owner;
834 if ($edit_by_owner) {
835 $this->setEditPerm(true);
836 }
837 }

References $edit_by_owner, and setEditPerm().

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

+ 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 857 of file class.ilDclTable.php.

857 : void
858 {
859 $this->edit_perm = $edit_perm;
860 if (!$edit_perm) {
861 $this->setEditByOwner(false);
862 }
863 }

References $edit_perm, and setEditByOwner().

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

+ 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 1131 of file class.ilDclTable.php.

1131 : void
1132 {
1133 $this->export_enabled = $export_enabled;
1134 }

References $export_enabled.

Referenced by cloneStructure(), and doRead().

+ Here is the caller graph for this function:

◆ setId()

ilDclTable::setId ( int  $a_id)

Set table id.

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

262 : void
263 {
264 $this->id = $a_id;
265 }

Referenced by doCreate().

+ Here is the caller graph for this function:

◆ setImportEnabled()

ilDclTable::setImportEnabled ( bool  $import_enabled)

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

1168 : void
1169 {
1170 $this->import_enabled = $import_enabled;
1171 }

References $import_enabled.

Referenced by cloneStructure(), and doRead().

+ Here is the caller graph for this function:

◆ setIsVisible()

ilDclTable::setIsVisible ( bool  $is_visible)

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

900 : void
901 {
902 $this->is_visible = $is_visible;
903 }

References $is_visible.

Referenced by cloneStructure(), and doRead().

+ Here is the caller graph for this function:

◆ setLimited()

ilDclTable::setLimited ( bool  $limited)

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

870 : void
871 {
872 $this->limited = $limited;
873 }

References $limited.

Referenced by cloneStructure(), and doRead().

+ Here is the caller graph for this function:

◆ setLimitEnd()

ilDclTable::setLimitEnd ( ?string  $limit_end)

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

880 : void
881 {
882 $this->limit_end = $limit_end;
883 }

References $limit_end.

Referenced by cloneStructure(), and doRead().

+ Here is the caller graph for this function:

◆ setLimitStart()

ilDclTable::setLimitStart ( ?string  $limit_start)

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

890 : void
891 {
892 $this->limit_start = $limit_start;
893 }

References $limit_start.

Referenced by cloneStructure(), and doRead().

+ Here is the caller graph for this function:

◆ setObjId()

ilDclTable::setObjId ( int  $a_id)

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

275 : void
276 {
277 $this->objId = $a_id;
278 }

Referenced by doRead().

+ Here is the caller graph for this function:

◆ setOrder()

ilDclTable::setOrder ( int  $table_order)

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

1163 : void
1164 {
1165 $this->table_order = $table_order;
1166 }

References $table_order.

Referenced by cloneStructure(), and doRead().

+ Here is the caller graph for this function:

◆ setPublicCommentsEnabled()

ilDclTable::setPublicCommentsEnabled ( bool  $public_comments)

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

944 : void
945 {
946 $this->public_comments = $public_comments;
947 }

References $public_comments.

Referenced by cloneStructure(), and doRead().

+ Here is the caller graph for this function:

◆ setSaveConfirmation()

ilDclTable::setSaveConfirmation ( bool  $save_confirmation)

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

969 : void
970 {
971 $this->save_confirmation = $save_confirmation;
972 }

References $save_confirmation.

Referenced by cloneStructure(), and doRead().

+ Here is the caller graph for this function:

◆ setTitle()

ilDclTable::setTitle ( string  $a_title)

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

285 : void
286 {
287 $this->title = $a_title;
288 }

Referenced by cloneStructure(), and doRead().

+ Here is the caller graph for this function:

◆ setViewOwnRecordsPerm()

ilDclTable::setViewOwnRecordsPerm ( bool  $view_own_perm)

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

954 : void
955 {
956 $this->view_own_records_perm = (int) $view_own_perm;
957 }

References ILIAS\Repository\int().

Referenced by cloneStructure(), and doRead().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showInvalidFields()

ilDclTable::showInvalidFields ( bool  $value)

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

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

◆ sortByOrder()

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

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

766 : void
767 {
768 // php-bug: https://bugs.php.net/bug.php?id=50688
769 // fixed in php 7 but for now we need the @ a workaround
770 usort($array, [$this, "compareOrder"]);
771 }

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

+ Here is the caller graph for this function:

◆ sortFields()

ilDclTable::sortFields ( array &  $fields)

sortFields

Parameters
ilDclBaseFieldModel[]$fields

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

751 : void
752 {
753 $this->sortByOrder($fields);
754 //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.
755 $named = [];
756 foreach ($fields as $field) {
757 $named[$field->getId()] = $field;
758 }
759
760 $fields = $named;
761 }

References $fields, and sortByOrder().

+ Here is the call graph for this function:

◆ sortTableViews()

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

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

445 : void
446 {
447 if ($tableviews == null) {
448 $tableviews = $this->getTableViews();
449 }
450
451 $order = 10;
452 foreach ($tableviews as $tableview) {
453 $tableview->setTableviewOrder($order);
454 $tableview->update();
455 $order += 10;
456 }
457 }

References getTableViews().

+ Here is the call graph for this function:

◆ updateFields()

ilDclTable::updateFields ( )

Update fields.

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

740 : void
741 {
742 foreach ($this->getFields() as $field) {
743 $field->doUpdate();
744 }
745 }

References getFields().

+ Here is the call graph for this function:

◆ updateOrder()

ilDclTable::updateOrder ( )

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

1150 : void
1151 {
1152 $result = $this->db->query('SELECT MAX(table_order) AS table_order FROM il_dcl_table WHERE obj_id = ' . $this->db->quote(
1153 $this->getCollectionObject()->getId(),
1154 'integer'
1155 ));
1156 $this->table_order = $this->db->fetchObject($result)->table_order + 10;
1157 $this->db->query('UPDATE il_dcl_table SET table_order = ' . $this->db->quote(
1158 $this->table_order,
1159 'integer'
1160 ) . ' WHERE id = ' . $this->db->quote($this->getId(), 'integer'));
1161 }

Referenced by getOrder().

+ Here is the caller graph for this function:

Field Documentation

◆ $add_perm

bool ilDclTable::$add_perm = false
protected

Definition at line 38 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 74 of file class.ilDclTable.php.

Referenced by getFields().

◆ $db

ilDBInterface ilDclTable::$db
protected

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

◆ $default_sort_field

int string ilDclTable::$default_sort_field = 0
protected

ID of the default sorting field.

Can be a DB field (int) or a standard field (string)

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

Referenced by cloneStructure(), getDefaultSortField(), and setDefaultSortField().

◆ $default_sort_field_order

string ilDclTable::$default_sort_field_order = 'asc'
protected

Default sort-order (asc|desc)

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

Referenced by getDefaultSortFieldOrder(), and setDefaultSortFieldOrder().

◆ $delete_by_owner

bool ilDclTable::$delete_by_owner = false
protected

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

Referenced by getDeleteByOwner(), and setDeleteByOwner().

◆ $delete_perm

bool ilDclTable::$delete_perm = false
protected

Definition at line 40 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 62 of file class.ilDclTable.php.

Referenced by getDescription(), and setDescription().

◆ $edit_by_owner

bool ilDclTable::$edit_by_owner = false
protected

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

Referenced by getEditByOwner(), and setEditByOwner().

◆ $edit_perm

bool ilDclTable::$edit_perm = false
protected

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

Referenced by getEditPerm(), and setEditPerm().

◆ $export_enabled

bool ilDclTable::$export_enabled = false
protected

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

Referenced by getExportEnabled(), and setExportEnabled().

◆ $fields

◆ $http

ILIAS HTTP Services ilDclTable::$http
protected

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

◆ $id

int ilDclTable::$id = 0
protected

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

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

◆ $import_enabled

bool ilDclTable::$import_enabled = false
protected

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

Referenced by getImportEnabled(), and setImportEnabled().

◆ $is_visible

bool ilDclTable::$is_visible = false
protected

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

Referenced by getIsVisible(), and setIsVisible().

◆ $limit_end

string ilDclTable::$limit_end = null
protected

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

Referenced by getLimitEnd(), and setLimitEnd().

◆ $limit_start

string ilDclTable::$limit_start = null
protected

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

Referenced by getLimitStart(), and setLimitStart().

◆ $limited

bool ilDclTable::$limited = false
protected

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

Referenced by getLimited(), and setLimited().

◆ $obj

ilObjDataCollection ilDclTable::$obj = null
protected

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

Referenced by getCollectionObject().

◆ $objId

int ilDclTable::$objId = null
protected

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

Referenced by getObjId().

◆ $public_comments

int ilDclTable::$public_comments = 0
protected

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

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

Referenced by getPublicCommentsEnabled(), and setPublicCommentsEnabled().

◆ $records

◆ $refinery

ILIAS Refinery Factory ilDclTable::$refinery
protected

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

◆ $save_confirmation

bool ilDclTable::$save_confirmation = false
protected

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

Referenced by getSaveConfirmation(), and setSaveConfirmation().

◆ $show_invalid

bool ilDclTable::$show_invalid = false
protected

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

◆ $stdFields

array ilDclTable::$stdFields = []
protected

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

◆ $table_order

int ilDclTable::$table_order = 0
protected

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

Referenced by getOrder(), and setOrder().

◆ $title

string ilDclTable::$title = ""
protected

◆ $user

ilObjUser ilDclTable::$user
protected

Definition at line 77 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 70 of file class.ilDclTable.php.

Referenced by getViewOwnRecordsPerm().


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