33 $select_str =
"stloc_{$this->getId()}_joined.value AS field_{$this->getId()},";
34 $join_str =
"LEFT JOIN il_dcl_record_field AS record_field_{$this->getId()} ON (record_field_{$this->getId()}.record_id = record.id AND record_field_{$this->getId()}.field_id = "
35 .
$ilDB->quote($this->
getId(),
'integer') .
") ";
36 $join_str .=
"LEFT JOIN il_dcl_stloc{$this->getStorageLocation()}_value AS stloc_{$this->getId()} ON (stloc_{$this->getId()}.record_field_id = record_field_{$this->getId()}.id) ";
37 $join_str .=
"LEFT JOIN il_dcl_record_field AS record_field_{$this->getId()}_joined ON (record_field_{$this->getId()}_joined.record_id = stloc_{$this->getId()}.value AND record_field_{$this->getId()}_joined.field_id = "
38 .
$ilDB->quote($ref_field->getId(),
'integer') .
") ";
39 $join_str .=
"LEFT JOIN il_dcl_stloc{$ref_field->getStorageLocation()}_value AS stloc_{$this->getId()}_joined ON (stloc_{$this->getId()}_joined.record_field_id = record_field_{$this->getId()}_joined.id) ";
42 $sql_obj->setSelectStatement($select_str);
43 $sql_obj->setJoinStatement($join_str);
44 $sql_obj->setOrderStatement(
"field_{$this->getId()} " . $direction);
66 " INNER JOIN il_dcl_record_field AS filter_record_field_{$this->getId()} ON (filter_record_field_{$this->getId()}.record_id = record.id AND filter_record_field_{$this->getId()}.field_id = "
67 .
$ilDB->quote($this->
getId(),
'integer') .
") ";
71 " INNER JOIN il_dcl_stloc{$this->getStorageLocation()}_value AS filter_stloc_{$this->getId()} ON (filter_stloc_{$this->getId()}.record_field_id = filter_record_field_{$this->getId()}.id AND filter_stloc_{$this->getId()}.value LIKE "
72 .
$ilDB->quote(
"%$filter_value%",
'text') .
") ";
75 " INNER JOIN il_dcl_stloc{$this->getStorageLocation()}_value AS filter_stloc_{$this->getId()} ON (filter_stloc_{$this->getId()}.record_field_id = filter_record_field_{$this->getId()}.id AND filter_stloc_{$this->getId()}.value = "
76 .
$ilDB->quote($filter_value,
'integer') .
") ";
80 $sql_obj->setJoinStatement($join_str);
115 if ($reference_clone) {
An exception for terminatinating execution or to throw for unit testing.
Class ilDclBaseFieldModel.
updateProperties()
Update properties of this field in Database.
setProperty($key, $value)
Set a property for a field (does not save)
hasProperty($key)
Checks if a certain property for a field is set.
const PROP_REFERENCE_LINK
getProperty($key)
Returns a certain property of a field.
static getCloneOf($id, $type)
static getFieldCache($field_id=0)
Class ilDclRecordQueryObject.
Class ilDclReferenceFieldModel.
getValidFieldProperties()
@inheritDoc
getRecordQueryFilterObject($filter_value="", ilDclBaseFieldModel $sort_field=null)
Returns a query-object for building the record-loader-sql-query.
getRecordQuerySortObject($direction="asc", $sort_by_status=false)
Returns a query-object for building the record-loader-sql-query.