5 include_once(
"./Services/COPage/classes/class.ilPageObject.php");
46 $this->table_id = $a_id;
87 $query =
"SELECT * FROM il_dcl_view WHERE table_id = ".$ilDB->quote($this->
getId(),
"integer");
88 $set = $ilDB->query(
$query);
89 $rec = $ilDB->fetchAssoc($set);
92 $this->type = $rec[
"type"];
93 $this->formtype = $rec[
"formtype"];
104 $id = $ilDB->nextId(
"il_dcl_view");
107 $query =
"INSERT INTO il_dcl_view (".
113 $ilDB->quote($this->
getId(),
"integer")
114 .
",".$ilDB->quote($this->
getTableId(),
"integer")
115 .
",".$ilDB->quote($this->
getType(),
"integer")
118 $ilDB->manipulate(
$query);
129 public function update($a_validate =
true, $a_no_history =
false)
137 parent::update($a_validate, $a_no_history);
152 if (!isset(self::$recordViewCache[$a_table_id])) {
155 $set = $ilDB->query(
"SELECT id FROM il_dcl_view".
156 " WHERE table_id = ".$ilDB->quote($a_table_id,
"integer").
" AND type = ".$ilDB->quote(0,
"integer").
" and formtype = ".$ilDB->quote(0,
"integer"));
157 $row = $ilDB->fetchAssoc($set);
158 self::$recordViewCache[$a_table_id] =
$row[
'id'];
161 return self::$recordViewCache[$a_table_id];
175 require_once(
"./Modules/DataCollection/classes/class.ilDataCollectionTable.php");
177 $fields = $objTable->getRecordFields();
178 $standardFields = $objTable->getStandardFields();
180 foreach($fields as $field)
185 $all[] =
"[".$field->getTitle().
"]";
188 $all[] =
'[dclrefln field="'.$field->getTitle().
'"][/dclrefln]';
192 $all[] =
'[dcliln field="'.$field->getTitle().
'"][/dcliln]';
197 $all[
"[".$field->getTitle().
"]"] = $field;
200 $all[
'[dclrefln field="'.$field->getTitle().
'"][/dclrefln]'] = $field;
204 $all[
'[dcliln field="'.$field->getTitle().
'"][/dcliln]'] = $field;
209 foreach($standardFields as $field){
210 $all[] =
"[".$field->getId().
"]";
static getIdByTableId($a_table_id)
Get view definition id by table id.
setTableId($a_id)
Set Table ID.
Class ilDataCollectionField.
getParentType()
Get parent type.
update($a_validate=true, $a_no_history=false)
Update Viewdefinition.
const INPUTFORMAT_ILIAS_REF
static getAvailablePlaceholders($a_table_id, $a_verbose=false)
Get all placeholders for table id.
getTableId()
Get Table ID.
doRead()
Read Viewdefinition.
getFormtype()
Get Formtype.
const INPUTFORMAT_REFERENCE
static getTableCache($table_id=0)
create()
Create new Viewdefinition.