ILIAS  release_8 Revision v8.24
class.ilDclBooleanFieldModel.php
Go to the documentation of this file.
1<?php
2
20{
26 $filter_value = "",
27 ?ilDclBaseFieldModel $sort_field = null
29 global $DIC;
30 $ilDB = $DIC['ilDB'];
31
32 $where_additions = "";
33
34 $join_str
35 = "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 = "
36 . $ilDB->quote($this->getId(), 'integer') . ")";
37 if ($filter_value == "checked") {
38 $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";
39 $join_str .= " AND filter_stloc_{$this->getId()}.value = " . $ilDB->quote(1, 'integer');
40 } else {
41 $join_str .= "LEFT 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";
42 $where_additions = " AND (filter_stloc_{$this->getId()}.value <> " . $ilDB->quote(1, 'integer')
43 . " OR filter_stloc_{$this->getId()}.value is NULL)";
44 }
45 $join_str .= " ) ";
46
47 $sql_obj = new ilDclRecordQueryObject();
48 $sql_obj->setJoinStatement($join_str);
49 $sql_obj->setWhereStatement($where_additions);
50
51 return $sql_obj;
52 }
53}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getRecordQueryFilterObject( $filter_value="", ?ilDclBaseFieldModel $sort_field=null)
Returns a query-object for building the record-loader-sql-query.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: feed.php:28