ILIAS
Release_4_4_x_branch Revision 61816
|
Class ilDataCollectionField. More...
Public Member Functions | |
__construct ($a_id=0) | |
Constructor. | |
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. | |
getStandardFields () | |
Returns the fields all datacollections have by default. | |
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. | |
getExportableFields () | |
Return all the fields that are marked as exportable. | |
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 () | |
setDescription ($description) | |
getDescription () | |
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 | |
$description |
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 78 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 991 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 1038 of file class.ilDataCollectionTable.php.
References $result, and $title.
Referenced by ilDataCollectionFieldEditGUI\checkInput().
ilDataCollectionTable::_hasRecords | ( | ) |
_hasRecords
Definition at line 958 of file class.ilDataCollectionTable.php.
References getRecords().
|
static |
$table_id | int |
Definition at line 976 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 966 of file class.ilDataCollectionTable.php.
References fields.
ilDataCollectionTable::buildOrderFields | ( | ) |
buildOrderFields orders the fields.
Definition at line 713 of file class.ilDataCollectionTable.php.
References $fields, getFields(), and sortByOrder().
Referenced by doCreate().
ilDataCollectionTable::buildTableAsArray | ( | ) |
Definition at line 1004 of file class.ilDataCollectionTable.php.
References $fields, $query, and getVisibleFields().
|
private |
Definition at line 646 of file class.ilDataCollectionTable.php.
References $ilUser, and getEditByOwner().
Referenced by hasPermissionToDeleteRecord(), and hasPermissionToEditRecord().
|
private |
Definition at line 660 of file class.ilDataCollectionTable.php.
References getLimited(), getLimitEnd(), getLimitStart(), and IL_CAL_DATE.
Referenced by hasPermissionToAddRecord(), hasPermissionToDeleteRecord(), and hasPermissionToEditRecord().
ilDataCollectionTable::cloneStructure | ( | $original_id | ) |
Definition at line 923 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 905 of file class.ilDataCollectionTable.php.
ilDataCollectionTable::deleteField | ( | $field_id | ) |
Definition at line 400 of file class.ilDataCollectionTable.php.
References $records, ilDataCollectionCache\getFieldCache(), and getRecords().
ilDataCollectionTable::doCreate | ( | ) |
Create new table.
Definition at line 160 of file class.ilDataCollectionTable.php.
References $id, $query, buildOrderFields(), ilDataCollectionField\EDIT_VIEW, ilDataCollectionField\EXPORTABLE_VIEW, ilDataCollectionField\FILTER_VIEW, getAddPerm(), getDeletePerm(), getDescription(), 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 118 of file class.ilDataCollectionTable.php.
References $query, $row, getCollectionObject(), getId(), getRecordFields(), and getRecords().
ilDataCollectionTable::doRead | ( | ) |
Read table.
Definition at line 89 of file class.ilDataCollectionTable.php.
References $query, getId(), setAddPerm(), setDeletePerm(), setDescription(), setEditByOwner(), setEditPerm(), setExportEnabled(), setIsVisible(), setLimited(), setLimitEnd(), setLimitStart(), setObjId(), and setTitle().
Referenced by __construct().
ilDataCollectionTable::doUpdate | ( | ) |
Definition at line 211 of file class.ilDataCollectionTable.php.
References getAddPerm(), getDeletePerm(), getDescription(), getEditByOwner(), getEditPerm(), getExportEnabled(), getId(), getIsVisible(), getLimited(), getLimitEnd(), getLimitStart(), getObjId(), and getTitle().
ilDataCollectionTable::getAddPerm | ( | ) |
Definition at line 760 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 379 of file class.ilDataCollectionTable.php.
References $query.
Referenced by ilDataCollectionRecordListViewdefinitionGUI\initForm().
ilDataCollectionTable::getCollectionObject | ( | ) |
getCollectionObject
Definition at line 298 of file class.ilDataCollectionTable.php.
References $obj, and loadObj().
Referenced by doDelete().
ilDataCollectionTable::getDeletePerm | ( | ) |
Definition at line 776 of file class.ilDataCollectionTable.php.
References $delete_perm.
Referenced by doCreate(), doUpdate(), and hasPermissionToDeleteRecord().
ilDataCollectionTable::getDescription | ( | ) |
Definition at line 888 of file class.ilDataCollectionTable.php.
References $description.
Referenced by doCreate(), and doUpdate().
ilDataCollectionTable::getEditableFields | ( | ) |
Definition at line 545 of file class.ilDataCollectionTable.php.
References $fields, and getRecordFields().
ilDataCollectionTable::getEditByOwner | ( | ) |
Definition at line 792 of file class.ilDataCollectionTable.php.
References $edit_by_owner.
Referenced by checkEditByOwner(), doCreate(), and doUpdate().
ilDataCollectionTable::getEditPerm | ( | ) |
Definition at line 808 of file class.ilDataCollectionTable.php.
References $edit_perm.
Referenced by doCreate(), doUpdate(), and hasPermissionToEditRecord().
ilDataCollectionTable::getExportableFields | ( | ) |
Return all the fields that are marked as exportable.
Definition at line 584 of file class.ilDataCollectionTable.php.
References $fields, and getFields().
ilDataCollectionTable::getExportEnabled | ( | ) |
Definition at line 1025 of file class.ilDataCollectionTable.php.
References $export_enabled.
Referenced by doCreate(), and doUpdate().
ilDataCollectionTable::getField | ( | $field_id | ) |
Definition at line 415 of file class.ilDataCollectionTable.php.
References $fields, and getFields().
Referenced by getPartialRecords().
ilDataCollectionTable::getFieldByTitle | ( | $name | ) |
$name |
Definition at line 736 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(), getExportableFields(), 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 565 of file class.ilDataCollectionTable.php.
References $fields, and getFields().
ilDataCollectionTable::getId | ( | ) |
Get table id.
Definition at line 248 of file class.ilDataCollectionTable.php.
References $id.
Referenced by ilDataCollectionRecordListTableGUI\__construct(), cloneStructure(), doCreate(), doDelete(), doRead(), doUpdate(), getPartialRecords(), and loadFields().
ilDataCollectionTable::getIsVisible | ( | ) |
Definition at line 872 of file class.ilDataCollectionTable.php.
References $is_visible.
Referenced by doCreate(), and doUpdate().
ilDataCollectionTable::getLimited | ( | ) |
Definition at line 824 of file class.ilDataCollectionTable.php.
References $limited.
Referenced by checkLimit(), doCreate(), and doUpdate().
ilDataCollectionTable::getLimitEnd | ( | ) |
Definition at line 840 of file class.ilDataCollectionTable.php.
References $limit_end.
Referenced by checkLimit(), doCreate(), and doUpdate().
ilDataCollectionTable::getLimitStart | ( | ) |
Definition at line 856 of file class.ilDataCollectionTable.php.
References $limit_start.
Referenced by checkLimit(), doCreate(), and doUpdate().
ilDataCollectionTable::getNewOrder | ( | ) |
getNewOrder
Definition at line 466 of file class.ilDataCollectionTable.php.
References $fields, and getFields().
ilDataCollectionTable::getObjId | ( | ) |
Get object id.
Definition at line 268 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 1058 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, ilDataCollectionDatatype\INPUTFORMAT_TEXT, and ilDataCollectionField\PROPERTYID_N_REFERENCE.
ilDataCollectionTable::getRecordFields | ( | ) |
Returns all fields of this table which are NOT standard fields.
Definition at line 515 of file class.ilDataCollectionTable.php.
References $fields, and loadFields().
Referenced by doDelete(), and getEditableFields().
ilDataCollectionTable::getRecords | ( | ) |
Definition at line 318 of file class.ilDataCollectionTable.php.
References $records, and loadRecords().
Referenced by _hasRecords(), deleteField(), doDelete(), and getRecordsByFilter().
ilDataCollectionTable::getRecordsByFilter | ( | array | $filter = array() | ) |
getRecordsByFilter
$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 336 of file class.ilDataCollectionTable.php.
References $records, getRecords(), and loadRecords().
ilDataCollectionTable::getStandardFields | ( | ) |
Returns the fields all datacollections have by default.
Definition at line 501 of file class.ilDataCollectionTable.php.
References $stdFields, and ilDataCollectionStandardField\_getStandardFields().
ilDataCollectionTable::getTitle | ( | ) |
Get title.
Definition at line 288 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 527 of file class.ilDataCollectionTable.php.
References $fields, and getFields().
Referenced by buildTableAsArray().
ilDataCollectionTable::hasCustomFields | ( | ) |
hasCustomFields
Definition at line 898 of file class.ilDataCollectionTable.php.
References fields, and loadFields().
ilDataCollectionTable::hasPermissionToAddRecord | ( | $ref | ) |
Definition at line 613 of file class.ilDataCollectionTable.php.
References ilObjDataCollection\_hasReadAccess(), ilObjDataCollection\_hasWriteAccess(), checkLimit(), and getAddPerm().
ilDataCollectionTable::hasPermissionToAddTable | ( | $ref_id | ) |
Definition at line 608 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 637 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 625 of file class.ilDataCollectionTable.php.
References ilObjDataCollection\_hasReadAccess(), ilObjDataCollection\_hasWriteAccess(), checkEditByOwner(), checkLimit(), and getEditPerm().
ilDataCollectionTable::hasPermissionToFields | ( | $ref_id | ) |
Definition at line 600 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 308 of file class.ilDataCollectionTable.php.
Referenced by getCollectionObject().
|
private |
Definition at line 356 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 752 of file class.ilDataCollectionTable.php.
References $add_perm.
Referenced by cloneStructure(), and doRead().
ilDataCollectionTable::setDeletePerm | ( | $delete_perm | ) |
boolean | $delete_perm |
Definition at line 768 of file class.ilDataCollectionTable.php.
References $delete_perm.
Referenced by cloneStructure(), and doRead().
ilDataCollectionTable::setDescription | ( | $description | ) |
string | $description |
Definition at line 880 of file class.ilDataCollectionTable.php.
References $description.
Referenced by doRead().
ilDataCollectionTable::setEditByOwner | ( | $edit_by_owner | ) |
boolean | $edit_by_owner |
Definition at line 784 of file class.ilDataCollectionTable.php.
References $edit_by_owner.
Referenced by cloneStructure(), and doRead().
ilDataCollectionTable::setEditPerm | ( | $edit_perm | ) |
boolean | $edit_perm |
Definition at line 800 of file class.ilDataCollectionTable.php.
References $edit_perm.
Referenced by cloneStructure(), and doRead().
ilDataCollectionTable::setExportEnabled | ( | $export_enabled | ) |
boolean | $export_enabled |
Definition at line 1017 of file class.ilDataCollectionTable.php.
References $export_enabled.
Referenced by doRead().
ilDataCollectionTable::setId | ( | $a_id | ) |
Set table id.
int | $a_id |
Definition at line 238 of file class.ilDataCollectionTable.php.
Referenced by doCreate().
ilDataCollectionTable::setIsVisible | ( | $is_visible | ) |
boolean | $is_visible |
Definition at line 864 of file class.ilDataCollectionTable.php.
References $is_visible.
Referenced by doRead().
ilDataCollectionTable::setLimited | ( | $limited | ) |
boolean | $limited |
Definition at line 816 of file class.ilDataCollectionTable.php.
References $limited.
Referenced by cloneStructure(), and doRead().
ilDataCollectionTable::setLimitEnd | ( | $limit_end | ) |
string | $limit_end |
Definition at line 832 of file class.ilDataCollectionTable.php.
References $limit_end.
Referenced by cloneStructure(), and doRead().
ilDataCollectionTable::setLimitStart | ( | $limit_start | ) |
string | $limit_start |
Definition at line 848 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 258 of file class.ilDataCollectionTable.php.
Referenced by doRead().
ilDataCollectionTable::setTitle | ( | $a_title | ) |
Set title.
string | $a_title |
Definition at line 278 of file class.ilDataCollectionTable.php.
Referenced by cloneStructure(), and doRead().
|
private |
$array | ilDataCollectionField[] the array to sort |
Definition at line 704 of file class.ilDataCollectionTable.php.
Referenced by buildOrderFields(), getFields(), loadFields(), and sortFields().
ilDataCollectionTable::sortFields | ( | & | $fields | ) |
sortFields
$fields | ilDataCollectionField[] |
Definition at line 687 of file class.ilDataCollectionTable.php.
References $fields, and sortByOrder().
ilDataCollectionTable::updateFields | ( | ) |
Definition at line 675 of file class.ilDataCollectionTable.php.
References getFields().
|
private |
Definition at line 35 of file class.ilDataCollectionTable.php.
Referenced by getAddPerm(), and setAddPerm().
|
private |
Definition at line 43 of file class.ilDataCollectionTable.php.
Referenced by getDeletePerm(), and setDeletePerm().
|
protected |
Definition at line 67 of file class.ilDataCollectionTable.php.
Referenced by getDescription(), and setDescription().
|
private |
Definition at line 47 of file class.ilDataCollectionTable.php.
Referenced by getEditByOwner(), and setEditByOwner().
|
private |
Definition at line 39 of file class.ilDataCollectionTable.php.
Referenced by getEditPerm(), and setEditPerm().
|
protected |
Definition at line 63 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(), getExportableFields(), 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 31 of file class.ilDataCollectionTable.php.
Referenced by getIsVisible(), and setIsVisible().
|
private |
Definition at line 59 of file class.ilDataCollectionTable.php.
Referenced by getLimitEnd(), and setLimitEnd().
|
private |
Definition at line 55 of file class.ilDataCollectionTable.php.
Referenced by getLimitStart(), and setLimitStart().
|
private |
Definition at line 51 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.
Referenced by getStandardFields().
|
protected |
Definition at line 24 of file class.ilDataCollectionTable.php.
Referenced by _getTableIdByTitle(), _hasFieldByTitle(), and getTitle().