2 require_once(
"./Modules/DataCollection/classes/Fields/Base/class.ilDclBaseFieldModel.php");
3 require_once(
"./Modules/DataCollection/classes/Helpers/class.ilDclRecordQueryObject.php");
24 $join_str =
"LEFT JOIN il_dcl_record_field AS sort_record_field_{$this->getId()} ON (sort_record_field_{$this->getId()}.record_id = record.id AND sort_record_field_{$this->getId()}.field_id = " 25 .
$ilDB->quote($this->
getId(),
'integer') .
") ";
26 $join_str .=
"LEFT JOIN il_dcl_stloc{$this->getStorageLocation()}_value AS sort_stloc_{$this->getId()} ON (sort_stloc_{$this->getId()}.record_field_id = sort_record_field_{$this->getId()}.id) ";
27 $join_str .=
"LEFT JOIN object_data AS sort_object_data_{$this->getId()} ON (sort_object_data_{$this->getId()}.obj_id = sort_stloc_{$this->getId()}.value) ";
28 $select_str =
" sort_object_data_{$this->getId()}.title AS field_{$this->getId()},";
31 $sql_obj->setSelectStatement($select_str);
32 $sql_obj->setJoinStatement($join_str);
33 $sql_obj->setOrderStatement(
"field_{$this->getId()} ".$direction);
51 "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 = " 52 .
$ilDB->quote($this->
getId(),
'integer') .
") ";
53 $join_str .=
"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) ";
55 "INNER JOIN object_data AS filter_object_data_{$this->getId()} ON (filter_object_data_{$this->getId()}.obj_id = filter_stloc_{$this->getId()}.value AND filter_object_data_{$this->getId()}.title LIKE " 56 .
$ilDB->quote(
"%$filter_value%",
'text') .
") ";
59 $sql_obj->setJoinStatement($join_str);
87 $supported_extensions = explode(
",", $input_value);
89 $trim_function =
function($value) {
90 return trim(trim(strtolower($value)),
".");
93 return array_map($trim_function, $supported_extensions);
105 if ($value == null || $value[
'size'] == 0) {
112 foreach ($table->getRecords() as $record) {
113 if ($this->
normalizeValue($record->getRecordFieldExportValue($this->getId())) == $this->
normalizeValue(
$title) && ($record->getId() != $record_id || $record_id == 0)) {
Class ilDclBaseFieldModel.
getRecordQueryFilterObject($filter_value="", ilDclBaseFieldModel $sort_field=null)
Returns a query-object for building the record-loader-sql-query.
Class ilDclRecordQueryObject.
parseSupportedExtensions($input_value)
const PROP_SUPPORTED_FILE_TYPES
static getTableCache($table_id=0)
getRecordQuerySortObject($direction="asc", $sort_by_status=false)
Returns a query-object for building the record-loader-sql-query.
getTableId()
Get table id.
hasProperty($key)
Checks if a certain property for a field is set.
getValidFieldProperties()
Create styles array
The data for the language used.
getProperty($key)
Returns a certain property of a field.
getSupportedExtensions()
Returns supported file-extensions.
Class ilDclBooleanFieldModel.
checkValidity($value, $record_id=null)