85    public function doUpdate($omit_notification = 
false)
 
   95            "last_update" => array(
 
  103            "last_edit_by" => array(
 
  120            $recordfield->doUpdate();
 
  124        if (!$omit_notification) {
 
  125            ilObjDataCollection::sendNotification(
"update_record", $this->
getTableId(), $this->
id);
 
  138        $query = 
"Select * From il_dcl_record WHERE id = " . 
$ilDB->quote($this->
getId(), 
"integer") . 
" ORDER BY id";
 
  141        $rec = 
$ilDB->fetchAssoc($set);
 
  160            throw new ilException(
"The field does not have a related table!");
 
  163        $id = 
$ilDB->nextId(
"il_dcl_record");
 
  166            = 
"INSERT INTO il_dcl_record ( 
  181            $recordField->doCreate();
 
  194        $this->recordfields[$field_id]->delete();
 
  195        if (count($this->recordfields) == 1) {
 
  230        $this->table_id = $a_id;
 
  252        $this->create_date = $a_datetime;
 
  274        $this->last_update = $a_datetime;
 
  296        $this->owner = $a_id;
 
  342            $record_field = $this->recordfields[$field_id];
 
  344            $this->recordfields[$field_id]->setValue($value);
 
  362            $this->recordfields[$field_id]->setValueFromForm($form);
 
  379        return $this->recordfields[$field->getId()]->getValueFromExcel($excel, $row, $col);
 
  391        $value = $field->getValueFromExcel($excel, $row, $col);
 
  393            $this->{$field->getId()} = $value;
 
  406        foreach ($this->recordfields as 
$id => $record_field) {
 
  407            $return[
$id] = $record_field->getValue();
 
  423        if ($field_id === 
null) {
 
  430            return $this->recordfields[$field_id]->getValue();
 
  444        if ($field_id === 
null) {
 
  451            return $this->recordfields[$field_id]->getValueForRepresentation();
 
  469            return $this->recordfields[$field_id]->getExportValue();
 
  487            return $this->recordfields[$field_id]->getPlainText();
 
  502            if ($field_id == 
'owner') {
 
  506                $worksheet->
setCell($row, $col, $name_array[
'lastname'] . 
', ' . $name_array[
'firstname']);
 
  513            $this->recordfields[$field_id]->fillExcelExport($worksheet, $row, $col);
 
  529            if (is_object($this->recordfields[$field_id])) {
 
  530                $value = $this->recordfields[$field_id]->getFormulaValue();
 
  551            if (is_object($this->recordfields[$field_id])) {
 
  552                $html = $this->recordfields[$field_id]->getRecordRepresentation()->getHTML();
 
  579            if (is_object($this->recordfields[$field_id])) {
 
  580                $html = $this->recordfields[$field_id]->getSortingValue();
 
  601    public function getRecordFieldSingleHTML($field_id, array $options = array())
 
  608            $field = $this->recordfields[$field_id];
 
  613            $html = $field->getRecordRepresentation()->getSingleHTML($options, 
false);
 
  634            $this->recordfields[$field_id]->getRecordRepresentation()->fillFormInput($form);
 
  645        if ($item = $form->getItemByPostVar(
"field_" . $field_id)) {
 
  663        $this->$field_id = $value;
 
  673        if ($item = $form->getItemByPostVar(
'field_' . $field_id)) {
 
  693                return $usr_data[
'login'];
 
  697        return $this->$field_id;
 
  721                return $this->
getId();
 
  736                    $this->table->getCollectionObject()
 
  743                return "<a class='dcl_comment' href='#' onclick=\"return " . $ajax_link . 
"\"> 
  745                    . 
"' alt='{$nComments} Comments'><span class='ilHActProp'>{$nComments}</span></a>";
 
  760                    $this->table->getCollectionObject()->getId(),
 
  781        if ($this->recordfields == 
null) {
 
  784            foreach ($this->table->getRecordFields() as $field) {
 
  800        if ($this->table == 
null) {
 
  815        return $this->recordfields[$field_id];
 
  824    public function doDelete($omit_notification = 
false)
 
  828        $ilAppEventHandler = 
$DIC[
'ilAppEventHandler'];
 
  831        foreach ($this->recordfields as $recordfield) {
 
  837                $this->
deleteMob($recordfield->getValue());
 
  840            $recordfield->delete();
 
  843        $query = 
"DELETE FROM il_dcl_record WHERE id = " . 
$ilDB->quote($this->
getId(), 
"integer");
 
  846        $this->table->loadRecords();
 
  848        if (!$omit_notification) {
 
  849            ilObjDataCollection::sendNotification(
"delete_record", $this->
getTableId(), $this->
getId());
 
  851            $ilAppEventHandler->raise(
 
  852                'Modules/DataCollection',
 
  856                    'table_id' => $this->table_id,
 
  857                    'record_id' => $this->
getId(),
 
  878        $this->
setOwner($original->getOwner());
 
  880        foreach ($new_fields as $old => $new) {
 
  881            $old_rec_field = $original->getRecordField($old);
 
  883            $new_rec_field->cloneStructure($old_rec_field);
 
  884            $this->recordfields[] = $new_rec_field;
 
  929        foreach ($this->table->getFilterableFields() as $field) {
 
  930            if (!isset($filter[
"filter_" . $field->getId()]) || !$filter[
"filter_" . $field->getId()]) {
 
  949        return $this->
getTable()->hasPermissionToEditRecord($ref_id, $this);
 
  960        return $this->
getTable()->hasPermissionToDeleteRecord($ref_id, $this);
 
  971        return $this->
getTable()->hasPermissionToViewRecord($ref_id, $this);
 
 1004        if ($this->comments === 
null) {
 
An exception for terminatinating execution or to throw for unit testing.
static buildAjaxHash( $a_node_type, $a_node_id, $a_obj_type, $a_obj_id, $a_sub_type=null, $a_sub_id=null, $a_news_id=0)
Build ajax hash.
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date @access public.
@classDescription Date and time handling
Class ilDclBaseRecordModel.
setId($a_id)
Set field id.
setLastEditBy($last_edit_by)
setStandardFieldFromForm($field_id, &$form)
fillRecordFieldFormInput($field_id, &$form)
getComments()
Get all comments of this record.
getCreateDate()
Get Creation Date.
getStandardFieldPlainText($field_id)
hasPermissionToEdit($ref_id)
getTableId()
Get Table ID.
loadRecordFields()
Load record fields.
deleteMob($obj_id)
Delete MOB.
fillStandardFieldFormInput($field_id, &$form)
setStandardField($field_id, $value)
setLastUpdate($a_datetime)
Set Last Update Date.
deleteFile($obj_id)
Delete a file.
getRecordFieldExportValue($field_id)
Get Field Export Value.
setRecordFieldValueFromForm($field_id, &$form)
Set a field value.
passThroughFilter(array $filter)
setOwner($a_id)
Set Owner.
cloneStructure($original_id, $new_fields)
getRecordFieldPlainText($field_id)
Get Field Export Value.
setCreateDate($a_datetime)
Set Creation Date.
doDelete($omit_notification=false)
Delete.
doUpdate($omit_notification=false)
doUpdate
hasPermissionToView($ref_id)
getRecordFieldFormulaValue($field_id)
setStandardFieldValueFromExcel($excel, $row, $col, $field)
getStandardField($field_id)
getRecordField($field_id)
getRecordFieldSortingValue($field_id, array $options=array())
hasPermissionToDelete($ref_id)
getStandardFieldFormulaValue($field_id)
getRecordFieldValueFromExcel($excel, $row, $col, $field)
getRecordFieldValue($field_id)
Get Field Value.
getLastUpdate()
Get Last Update Date.
getStandardFieldHTML($field_id, array $options=array())
getRecordFieldHTML($field_id, array $options=array())
setTableId($a_id)
Set Table ID.
getRecordFieldRepresentationValue($field_id)
Get Field Value for Representation in a Form.
fillRecordFieldExcelExport(ilExcel $worksheet, &$row, &$col, $field_id)
setRecordFieldValue($field_id, $value)
Set a field value.
static getRecordFieldCache($record, $field)
static getTableCache($table_id=0)
static getRecordCache($record_id=0)
static setCloneOf($old, $new, $type)
static getFieldRepresentation(ilDclBaseFieldModel $field)
static _isStandardField($field_id)
static _tableExists($table_id)
setCell($a_row, $a_col, $a_value, $a_datatype=null)
Set cell value.
Base class for ILIAS Exception handling.
static getListCommentsJSCall($a_hash, $a_update_code=null)
Get list comments js call.
static _getNotesOfObject( $a_rep_obj_id, $a_obj_id, $a_obj_type, $a_type=IL_NOTE_PRIVATE, $a_incl_sub=false, $a_filter="", $a_all_public="y", $a_repository_mode=true, $a_sort_ascending=false, $a_news_id=0)
get all notes related to a specific object
static _lookupLogin($a_user_id)
lookup login
static _lookupName($a_user_id)
lookup user name
static _lookupObjId($a_id)
static _exists($a_id, $a_reference=false, $a_type=null)
checks if an object exists in object_data@access public
static getNamePresentation( $a_user_id, $a_user_image=false, $a_profile_link=false, $a_profile_back_link="", $a_force_first_lastname=false, $a_omit_login=false, $a_sortable=true, $a_return_data_array=false, $a_ctrl_path="ilpublicuserprofilegui")
Default behaviour is:
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)