ILIAS
release_4-3 Revision
|
Class ilDataCollectionField. More...
Public Member Functions | |
__construct ($a_id=0) | |
Constructor public. | |
doRead () | |
Read table. | |
doDelete ($delete_main_table=false) | |
doDelete Attention this does not delete the maintable of it's the maintabla of the collection. | |
doCreate () | |
Create new table. | |
doUpdate () | |
setId ($a_id) | |
Set table id. | |
getId () | |
Get table id. | |
setObjId ($a_id) | |
Set object id. | |
getObjId () | |
Get object id. | |
setTitle ($a_title) | |
Set title. | |
getTitle () | |
Get title. | |
getCollectionObject () | |
getCollectionObject | |
getRecords () | |
getRecordsByFilter (array $filter=array()) | |
getRecordsByFilter | |
getAll ($a_id) | |
get all tables of a Data Collection Object | |
deleteField ($field_id) | |
getField ($field_id) | |
getFieldIds () | |
getNewOrder () | |
getNewOrder | |
getFields () | |
Returns all fields of this table including the standard fields. | |
getRecordFields () | |
Returns all fields of this table which are NOT standard fields. | |
getVisibleFields () | |
Returns all fields of this table who have set their visibility to true, including standard fields. | |
getEditableFields () | |
getFilterableFields () | |
getFilterableFields Returns all fields of this table who have set their filterable to true, including standard fields. | |
hasPermissionToFields ($ref_id) | |
hasPermissionToAddTable ($ref_id) | |
hasPermissionToAddRecord ($ref) | |
hasPermissionToEditRecord ($ref, $record) | |
hasPermissionToDeleteRecord ($ref, $record) | |
updateFields () | |
sortFields (&$fields) | |
sortFields | |
buildOrderFields () | |
buildOrderFields orders the fields. | |
getFieldByTitle ($name) | |
setAddPerm ($add_perm) | |
getAddPerm () | |
setDeletePerm ($delete_perm) | |
getDeletePerm () | |
setEditByOwner ($edit_by_owner) | |
getEditByOwner () | |
setEditPerm ($edit_perm) | |
getEditPerm () | |
setLimited ($limited) | |
getLimited () | |
setLimitEnd ($limit_end) | |
getLimitEnd () | |
setLimitStart ($limit_start) | |
getLimitStart () | |
setIsVisible ($is_visible) | |
getIsVisible () | |
hasCustomFields () | |
hasCustomFields | |
compareOrder ($a, $b) | |
cloneStructure ($original_id) | |
_hasRecords () | |
_hasRecords | |
addField ($field) | |
buildTableAsArray () | |
setExportEnabled ($export_enabled) | |
getExportEnabled () | |
getPartialRecords ($sort, $direction, $limit, $offset, array $filter=array()) | |
Return only the needed subset of record objects for the table, according to sorting, paging and filters. |
Static Public Member Functions | |
static | _tableExists ($table_id) |
static | _getTableIdByTitle ($title, $obj_id) |
static | _hasFieldByTitle ($title, $obj_id) |
Checks if a table has a field with the given title. |
Protected Attributes | |
$id | |
$objId | |
$obj | |
$title | |
$export_enabled |
Private Member Functions | |
loadObj () | |
loadRecords () | |
loadFields () | |
checkEditByOwner ($record) | |
checkLimit () | |
sortByOrder (&$array) |
Private Attributes | |
$fields | |
$stdFields | |
$records | |
$is_visible | |
$add_perm | |
$edit_perm | |
$delete_perm | |
$edit_by_owner | |
$limited | |
$limit_start | |
$limit_end |
Class ilDataCollectionField.
Definition at line 19 of file class.ilDataCollectionTable.php.
ilDataCollectionTable::__construct | ( | $a_id = 0 | ) |
Constructor public.
integer | fiel_id |
Definition at line 76 of file class.ilDataCollectionTable.php.
References doRead().
|
static |
$title | Title of table |
$obj_id | DataCollection object ID where the table belongs to |
Definition at line 942 of file class.ilDataCollectionTable.php.
References $id, $result, and $title.
Referenced by ilObjDataCollection\cloneStructure().
|
static |
Checks if a table has a field with the given title.
$title | Title of field |
$obj_id | Obj-ID of the table |
Definition at line 983 of file class.ilDataCollectionTable.php.
References $result, and $title.
Referenced by ilDataCollectionFieldEditGUI\checkInput().
ilDataCollectionTable::_hasRecords | ( | ) |
_hasRecords
Definition at line 914 of file class.ilDataCollectionTable.php.
References getRecords().
|
static |
$table_id | int |
Definition at line 930 of file class.ilDataCollectionTable.php.
References $query, and $result.
Referenced by ilDataCollectionRecord\doCreate(), and ilDataCollectionField\doCreate().
ilDataCollectionTable::addField | ( | $field | ) |
$field | ilDataCollectionField add an already created field for eg. ordering. |
Definition at line 922 of file class.ilDataCollectionTable.php.
References fields.
ilDataCollectionTable::buildOrderFields | ( | ) |
buildOrderFields orders the fields.
Definition at line 687 of file class.ilDataCollectionTable.php.
References $fields, getFields(), and sortByOrder().
Referenced by doCreate().
ilDataCollectionTable::buildTableAsArray | ( | ) |
Definition at line 952 of file class.ilDataCollectionTable.php.
References $fields, $query, and getVisibleFields().
|
private |
Definition at line 614 of file class.ilDataCollectionTable.php.
References $ilUser, and getEditByOwner().
Referenced by hasPermissionToDeleteRecord(), and hasPermissionToEditRecord().
|
private |
Definition at line 629 of file class.ilDataCollectionTable.php.
References getLimited(), getLimitEnd(), getLimitStart(), IL_CAL_DATE, and IL_CAL_UNIX.
Referenced by hasPermissionToAddRecord(), hasPermissionToDeleteRecord(), and hasPermissionToEditRecord().
ilDataCollectionTable::cloneStructure | ( | $original_id | ) |
Definition at line 881 of file class.ilDataCollectionTable.php.
References doCreate(), getId(), ilDataCollectionRecordViewViewdefinition\getIdByTableId(), ilDataCollectionCache\getTableCache(), setAddPerm(), setDeletePerm(), setEditByOwner(), setEditPerm(), setLimited(), setLimitEnd(), setLimitStart(), and setTitle().
ilDataCollectionTable::compareOrder | ( | $a, | |
$b | |||
) |
Definition at line 860 of file class.ilDataCollectionTable.php.
ilDataCollectionTable::deleteField | ( | $field_id | ) |
Definition at line 396 of file class.ilDataCollectionTable.php.
References $records, ilDataCollectionCache\getFieldCache(), and getRecords().
ilDataCollectionTable::doCreate | ( | ) |
Create new table.
Definition at line 149 of file class.ilDataCollectionTable.php.
References $id, $query, buildOrderFields(), ilDataCollectionField\EDIT_VIEW, ilDataCollectionField\FILTER_VIEW, getAddPerm(), getDeletePerm(), getEditByOwner(), getEditPerm(), getExportEnabled(), getId(), getIsVisible(), getLimited(), getLimitEnd(), getLimitStart(), getObjId(), getTitle(), setId(), and ilDataCollectionField\VIEW_VIEW.
Referenced by cloneStructure().
ilDataCollectionTable::doDelete | ( | $delete_main_table = false | ) |
doDelete Attention this does not delete the maintable of it's the maintabla of the collection.
unlink the the maintable in the collections object to make this work.
boolean | $delete_main_table | true to delete table anyway |
Definition at line 116 of file class.ilDataCollectionTable.php.
References $query, getCollectionObject(), getId(), getRecordFields(), and getRecords().
ilDataCollectionTable::doRead | ( | ) |
Read table.
Definition at line 89 of file class.ilDataCollectionTable.php.
References $query, getId(), setAddPerm(), setDeletePerm(), setEditByOwner(), setEditPerm(), setExportEnabled(), setIsVisible(), setLimited(), setLimitEnd(), setLimitStart(), setObjId(), and setTitle().
Referenced by __construct().
ilDataCollectionTable::doUpdate | ( | ) |
Definition at line 205 of file class.ilDataCollectionTable.php.
References getAddPerm(), getDeletePerm(), getEditByOwner(), getEditPerm(), getExportEnabled(), getId(), getIsVisible(), getLimited(), getLimitEnd(), getLimitStart(), getObjId(), and getTitle().
ilDataCollectionTable::getAddPerm | ( | ) |
Definition at line 732 of file class.ilDataCollectionTable.php.
References $add_perm.
Referenced by doCreate(), doUpdate(), and hasPermissionToAddRecord().
ilDataCollectionTable::getAll | ( | $a_id | ) |
get all tables of a Data Collection Object
int | $a_id | obj_id |
Definition at line 373 of file class.ilDataCollectionTable.php.
References $query.
Referenced by ilDataCollectionRecordListViewdefinitionGUI\initForm().
ilDataCollectionTable::getCollectionObject | ( | ) |
getCollectionObject
Definition at line 290 of file class.ilDataCollectionTable.php.
References $obj, and loadObj().
Referenced by doDelete().
ilDataCollectionTable::getDeletePerm | ( | ) |
Definition at line 748 of file class.ilDataCollectionTable.php.
References $delete_perm.
Referenced by doCreate(), doUpdate(), and hasPermissionToDeleteRecord().
ilDataCollectionTable::getEditableFields | ( | ) |
Definition at line 532 of file class.ilDataCollectionTable.php.
References $fields, and getRecordFields().
ilDataCollectionTable::getEditByOwner | ( | ) |
Definition at line 764 of file class.ilDataCollectionTable.php.
References $edit_by_owner.
Referenced by checkEditByOwner(), doCreate(), and doUpdate().
ilDataCollectionTable::getEditPerm | ( | ) |
Definition at line 780 of file class.ilDataCollectionTable.php.
References $edit_perm.
Referenced by doCreate(), doUpdate(), and hasPermissionToEditRecord().
ilDataCollectionTable::getExportEnabled | ( | ) |
Definition at line 972 of file class.ilDataCollectionTable.php.
References $export_enabled.
Referenced by doCreate(), and doUpdate().
ilDataCollectionTable::getField | ( | $field_id | ) |
Definition at line 413 of file class.ilDataCollectionTable.php.
References $fields, and getFields().
Referenced by getPartialRecords().
ilDataCollectionTable::getFieldByTitle | ( | $name | ) |
$name |
Definition at line 711 of file class.ilDataCollectionTable.php.
References getFields().
Referenced by getPartialRecords().
ilDataCollectionTable::getFieldIds | ( | ) |
Definition at line 431 of file class.ilDataCollectionTable.php.
References getFields().
ilDataCollectionTable::getFields | ( | ) |
Returns all fields of this table including the standard fields.
Definition at line 484 of file class.ilDataCollectionTable.php.
References $fields, ilDataCollectionStandardField\_getStandardFields(), fields, loadFields(), and sortByOrder().
Referenced by buildOrderFields(), getField(), getFieldByTitle(), getFieldIds(), getFilterableFields(), getNewOrder(), getVisibleFields(), and updateFields().
ilDataCollectionTable::getFilterableFields | ( | ) |
getFilterableFields Returns all fields of this table who have set their filterable to true, including standard fields.
Definition at line 553 of file class.ilDataCollectionTable.php.
References $fields, and getFields().
ilDataCollectionTable::getId | ( | ) |
Get table id.
Definition at line 241 of file class.ilDataCollectionTable.php.
References $id.
Referenced by cloneStructure(), doCreate(), doDelete(), doRead(), doUpdate(), getPartialRecords(), and loadFields().
ilDataCollectionTable::getIsVisible | ( | ) |
Definition at line 844 of file class.ilDataCollectionTable.php.
References $is_visible.
Referenced by doCreate(), and doUpdate().
ilDataCollectionTable::getLimited | ( | ) |
Definition at line 796 of file class.ilDataCollectionTable.php.
References $limited.
Referenced by checkLimit(), doCreate(), and doUpdate().
ilDataCollectionTable::getLimitEnd | ( | ) |
Definition at line 812 of file class.ilDataCollectionTable.php.
References $limit_end.
Referenced by checkLimit(), doCreate(), and doUpdate().
ilDataCollectionTable::getLimitStart | ( | ) |
Definition at line 828 of file class.ilDataCollectionTable.php.
References $limit_start.
Referenced by checkLimit(), doCreate(), and doUpdate().
ilDataCollectionTable::getNewOrder | ( | ) |
getNewOrder
Definition at line 465 of file class.ilDataCollectionTable.php.
References $fields, and getFields().
ilDataCollectionTable::getObjId | ( | ) |
Get object id.
Definition at line 261 of file class.ilDataCollectionTable.php.
References $objId.
Referenced by doCreate(), and doUpdate().
ilDataCollectionTable::getPartialRecords | ( | $sort, | |
$direction, | |||
$limit, | |||
$offset, | |||
array | $filter = array() |
||
) |
Return only the needed subset of record objects for the table, according to sorting, paging and filters.
string | $sort | Title of a field where the ilTable2GUI is sorted |
string | $direction | 'desc' or 'asc' |
int | $limit | Limit of records |
int | $offset | Offset from records |
array | $filter | Containing the filter values |
Definition at line 999 of file class.ilDataCollectionTable.php.
References $id, $ilUser, $records, getField(), getFieldByTitle(), ilDataCollectionCache\getFieldCache(), getId(), ilDataCollectionCache\getRecordCache(), ilDataCollectionDatatype\INPUTFORMAT_BOOLEAN, ilDataCollectionDatatype\INPUTFORMAT_DATETIME, ilDataCollectionDatatype\INPUTFORMAT_FILE, ilDataCollectionDatatype\INPUTFORMAT_ILIAS_REF, ilDataCollectionDatatype\INPUTFORMAT_MOB, ilDataCollectionDatatype\INPUTFORMAT_NUMBER, ilDataCollectionDatatype\INPUTFORMAT_RATING, ilDataCollectionDatatype\INPUTFORMAT_REFERENCE, and ilDataCollectionDatatype\INPUTFORMAT_TEXT.
ilDataCollectionTable::getRecordFields | ( | ) |
Returns all fields of this table which are NOT standard fields.
Definition at line 501 of file class.ilDataCollectionTable.php.
References $fields, and loadFields().
Referenced by doDelete(), and getEditableFields().
ilDataCollectionTable::getRecords | ( | ) |
Definition at line 311 of file class.ilDataCollectionTable.php.
References $records, and loadRecords().
Referenced by _hasRecords(), deleteField(), doDelete(), and getRecordsByFilter().
ilDataCollectionTable::getRecordsByFilter | ( | array | $filter = array() | ) |
getRecordsByFilter
@param $filter filter is of the form array("filter_{field_id}" => filter); For dates and integers this filter must be of the form array("from" => from, "to" => to). In case of dates from and to have to be ilDateTime objects in case of integers they have to be integers as well.
Definition at line 327 of file class.ilDataCollectionTable.php.
References $records, getRecords(), and loadRecords().
ilDataCollectionTable::getTitle | ( | ) |
Get title.
Definition at line 281 of file class.ilDataCollectionTable.php.
References $title.
Referenced by doCreate(), and doUpdate().
ilDataCollectionTable::getVisibleFields | ( | ) |
Returns all fields of this table who have set their visibility to true, including standard fields.
Definition at line 512 of file class.ilDataCollectionTable.php.
References $fields, and getFields().
Referenced by buildTableAsArray().
ilDataCollectionTable::hasCustomFields | ( | ) |
hasCustomFields
Definition at line 853 of file class.ilDataCollectionTable.php.
References fields, and loadFields().
ilDataCollectionTable::hasPermissionToAddRecord | ( | $ref | ) |
Definition at line 586 of file class.ilDataCollectionTable.php.
References ilObjDataCollection\_hasReadAccess(), ilObjDataCollection\_hasWriteAccess(), checkLimit(), and getAddPerm().
ilDataCollectionTable::hasPermissionToAddTable | ( | $ref_id | ) |
Definition at line 580 of file class.ilDataCollectionTable.php.
References $ref_id, and ilObjDataCollection\_hasWriteAccess().
ilDataCollectionTable::hasPermissionToDeleteRecord | ( | $ref, | |
$record | |||
) |
$ref | int the reference id of the current datacollection object |
$record | ilDataCollectionRecord the record which will be deleted |
Definition at line 606 of file class.ilDataCollectionTable.php.
References ilObjDataCollection\_hasReadAccess(), ilObjDataCollection\_hasWriteAccess(), checkEditByOwner(), checkLimit(), and getDeletePerm().
ilDataCollectionTable::hasPermissionToEditRecord | ( | $ref, | |
$record | |||
) |
$ref | int the reference id of the current datacollection object |
$record | ilDataCollectionRecord the record which will be edited |
Definition at line 596 of file class.ilDataCollectionTable.php.
References ilObjDataCollection\_hasReadAccess(), ilObjDataCollection\_hasWriteAccess(), checkEditByOwner(), checkLimit(), and getEditPerm().
ilDataCollectionTable::hasPermissionToFields | ( | $ref_id | ) |
Definition at line 572 of file class.ilDataCollectionTable.php.
References $ref_id, and ilObjDataCollection\_hasWriteAccess().
|
private |
Definition at line 439 of file class.ilDataCollectionTable.php.
References $fields, $query, ilDataCollectionCache\buildFieldFromRecord(), fields, getId(), and sortByOrder().
Referenced by getFields(), getRecordFields(), and hasCustomFields().
|
private |
Definition at line 300 of file class.ilDataCollectionTable.php.
Referenced by getCollectionObject().
|
private |
Definition at line 347 of file class.ilDataCollectionTable.php.
References $query, $records, and ilDataCollectionCache\getRecordCache().
Referenced by getRecords(), and getRecordsByFilter().
ilDataCollectionTable::setAddPerm | ( | $add_perm | ) |
boolean | $add_perm |
Definition at line 724 of file class.ilDataCollectionTable.php.
References $add_perm.
Referenced by cloneStructure(), and doRead().
ilDataCollectionTable::setDeletePerm | ( | $delete_perm | ) |
boolean | $delete_perm |
Definition at line 740 of file class.ilDataCollectionTable.php.
References $delete_perm.
Referenced by cloneStructure(), and doRead().
ilDataCollectionTable::setEditByOwner | ( | $edit_by_owner | ) |
boolean | $edit_by_owner |
Definition at line 756 of file class.ilDataCollectionTable.php.
References $edit_by_owner.
Referenced by cloneStructure(), and doRead().
ilDataCollectionTable::setEditPerm | ( | $edit_perm | ) |
boolean | $edit_perm |
Definition at line 772 of file class.ilDataCollectionTable.php.
References $edit_perm.
Referenced by cloneStructure(), and doRead().
ilDataCollectionTable::setExportEnabled | ( | $export_enabled | ) |
boolean | $export_enabled |
Definition at line 964 of file class.ilDataCollectionTable.php.
References $export_enabled.
Referenced by doRead().
ilDataCollectionTable::setId | ( | $a_id | ) |
Set table id.
int | $a_id |
Definition at line 231 of file class.ilDataCollectionTable.php.
Referenced by doCreate().
ilDataCollectionTable::setIsVisible | ( | $is_visible | ) |
boolean | $is_visible |
Definition at line 836 of file class.ilDataCollectionTable.php.
References $is_visible.
Referenced by doRead().
ilDataCollectionTable::setLimited | ( | $limited | ) |
boolean | $limited |
Definition at line 788 of file class.ilDataCollectionTable.php.
References $limited.
Referenced by cloneStructure(), and doRead().
ilDataCollectionTable::setLimitEnd | ( | $limit_end | ) |
string | $limit_end |
Definition at line 804 of file class.ilDataCollectionTable.php.
References $limit_end.
Referenced by cloneStructure(), and doRead().
ilDataCollectionTable::setLimitStart | ( | $limit_start | ) |
string | $limit_start |
Definition at line 820 of file class.ilDataCollectionTable.php.
References $limit_start.
Referenced by cloneStructure(), and doRead().
ilDataCollectionTable::setObjId | ( | $a_id | ) |
Set object id.
int | $obj_id |
Definition at line 251 of file class.ilDataCollectionTable.php.
Referenced by doRead().
ilDataCollectionTable::setTitle | ( | $a_title | ) |
Set title.
string | $a_title |
Definition at line 271 of file class.ilDataCollectionTable.php.
Referenced by cloneStructure(), and doRead().
|
private |
$array | ilDataCollectionField[] the array to sort |
Definition at line 678 of file class.ilDataCollectionTable.php.
Referenced by buildOrderFields(), getFields(), loadFields(), and sortFields().
ilDataCollectionTable::sortFields | ( | & | $fields | ) |
sortFields
$fields | ilDataCollectionField[] |
Definition at line 660 of file class.ilDataCollectionTable.php.
References $fields, and sortByOrder().
ilDataCollectionTable::updateFields | ( | ) |
Definition at line 648 of file class.ilDataCollectionTable.php.
References getFields().
|
private |
Definition at line 37 of file class.ilDataCollectionTable.php.
Referenced by getAddPerm(), and setAddPerm().
|
private |
Definition at line 46 of file class.ilDataCollectionTable.php.
Referenced by getDeletePerm(), and setDeletePerm().
|
private |
Definition at line 50 of file class.ilDataCollectionTable.php.
Referenced by getEditByOwner(), and setEditByOwner().
|
private |
Definition at line 42 of file class.ilDataCollectionTable.php.
Referenced by getEditPerm(), and setEditPerm().
|
protected |
Definition at line 68 of file class.ilDataCollectionTable.php.
Referenced by getExportEnabled(), and setExportEnabled().
|
private |
Definition at line 25 of file class.ilDataCollectionTable.php.
Referenced by buildOrderFields(), buildTableAsArray(), getEditableFields(), getField(), getFields(), getFilterableFields(), getNewOrder(), getRecordFields(), getVisibleFields(), loadFields(), and sortFields().
|
protected |
Definition at line 21 of file class.ilDataCollectionTable.php.
Referenced by _getTableIdByTitle(), doCreate(), getId(), and getPartialRecords().
|
private |
Definition at line 32 of file class.ilDataCollectionTable.php.
Referenced by getIsVisible(), and setIsVisible().
|
private |
Definition at line 63 of file class.ilDataCollectionTable.php.
Referenced by getLimitEnd(), and setLimitEnd().
|
private |
Definition at line 59 of file class.ilDataCollectionTable.php.
Referenced by getLimitStart(), and setLimitStart().
|
private |
Definition at line 55 of file class.ilDataCollectionTable.php.
Referenced by getLimited(), and setLimited().
|
protected |
Definition at line 23 of file class.ilDataCollectionTable.php.
Referenced by getCollectionObject().
|
protected |
Definition at line 22 of file class.ilDataCollectionTable.php.
Referenced by getObjId().
|
private |
Definition at line 27 of file class.ilDataCollectionTable.php.
Referenced by deleteField(), getPartialRecords(), getRecords(), getRecordsByFilter(), and loadRecords().
|
private |
Definition at line 26 of file class.ilDataCollectionTable.php.
|
protected |
Definition at line 24 of file class.ilDataCollectionTable.php.
Referenced by _getTableIdByTitle(), _hasFieldByTitle(), and getTitle().