19 declare(strict_types=1);
31 $date_from = (isset($filter_value[
'from']) && is_object($filter_value[
'from'])) ? $filter_value[
'from'] : null;
32 $date_to = (isset($filter_value[
'to']) && is_object($filter_value[
'to'])) ? $filter_value[
'to'] : null;
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 . $this->db->quote($this->
getId(),
'integer') .
") ";
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 ";
39 $join_str .=
"AND filter_stloc_{$this->getId()}.value >= " . $this->db->quote($date_from,
'date') .
" ";
42 $join_str .=
"AND filter_stloc_{$this->getId()}.value <= " . $this->db->quote($date_to,
'date') .
" ";
47 $sql_obj->setJoinStatement($join_str);
52 protected function areEqual($value_1, $value_2): bool
54 if ($value_1 === null || $value_2 === null) {
57 return date(
'Y-m-d', strtotime($value_1)) === date(
'Y-m-d', strtotime($value_2));
areEqual($value_1, $value_2)
getRecordQueryFilterObject( $filter_value="", ?ilDclBaseFieldModel $sort_field=null)