19 declare(strict_types=1);
31 $where_additions =
"";
34 =
"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 = " 35 . $this->db->quote($this->
getId(),
'integer') .
")";
36 if ($filter_value ==
"checked") {
37 $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";
38 $join_str .=
" AND filter_stloc_{$this->getId()}.value = " . $this->db->quote(1,
'integer');
40 $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";
41 $where_additions =
" AND (filter_stloc_{$this->getId()}.value <> " . $this->db->quote(1,
'integer')
42 .
" OR filter_stloc_{$this->getId()}.value is NULL)";
47 $sql_obj->setJoinStatement($join_str);
48 if ($where_additions) {
49 $sql_obj->setWhereStatement($where_additions);
64 if (!is_numeric($value) && $value !=
'') {
69 parent::checkValidity((
int) $value, $record_id);
getRecordQueryFilterObject( $filter_value="", ?ilDclBaseFieldModel $sort_field=null)
Returns a query-object for building the record-loader-sql-query.
checkValidityFromForm(ilPropertyFormGUI &$form, ?int $record_id=null)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null