19 declare(strict_types=1);
36 if ($value !==
null) {
37 if ($value[
"lower"] ??
false) {
40 if ($value[
"upper"] ??
false) {
55 $check->addSubItem($date_from);
58 $date_from->setDate($this->
getLowerADT()->getDate());
64 $check->addSubItem($date_until);
67 $date_until->setDate($this->
getUpperADT()->getDate());
76 $item->addCombinationItem(
"lower", $lower, $this->
lng->txt(
"from"));
83 $item->addCombinationItem(
"upper", $upper, $this->
lng->txt(
"to"));
98 return ($a_post[
'lower'] ??
false) || ($a_post[
'upper'] ??
false);
100 return parent::shouldBeImportedFromPost($a_post);
118 $item->setDate($start);
121 $item->setDate($end);
122 } elseif (array_key_exists($this->
getElementId(), $this->table_filter_fields)) {
123 $this->table_filter_fields[$this->
getElementId()]->getCombinationItem(
"lower")->setDate($start);
124 $this->table_filter_fields[$this->
getElementId()]->getCombinationItem(
"upper")->setDate($end);
126 "lower" => (!$start || $start->isNull()) ?
null : $start->get(
IL_CAL_DATE),
142 public function getSQLCondition(
string $a_element_id,
int $mode = self::SQL_LIKE, array $quotedWords = []): string
147 $sql[] = $a_element_id .
" >= " . $this->db->quote(
153 $sql[] = $a_element_id .
" <= " . $this->db->quote(
158 return "(" . implode(
" AND ", $sql) .
")";
188 return serialize(
$res);
195 $a_value = unserialize($a_value);
196 if (is_array($a_value)) {
197 if (isset($a_value[
"lower"])) {
200 if (isset($a_value[
"upper"])) {
static parseIncomingDate($value, bool $add_time=false)
Try to parse incoming value to date object.
isValidADTDefinition(ilADTDefinition $a_adt_def)
getSQLCondition(string $a_element_id, int $mode=self::SQL_LIKE, array $quotedWords=[])
isLargerOrEqual(ilADT $a_adt)
isInbetweenOrEqual(ilADT $a_adt_from, ilADT $a_adt_to)
Check if self is inbetween given ADTs (inclusive)
isSmallerOrEqual(ilADT $a_adt)
Check if given ADT is smaller or equal than self.
Class ilADTDateSearchBridgeRange.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
readFilter()
Load value(s) from filter store (in session)
getUpperADT()
Get upper ADT.
extractPostValues(?array $a_post=null)
Extract data from (post) values.
shouldBeImportedFromPost($a_post)
importFromPost(?array $a_post=null)
writeFilter($a_value=null)
Write value(s) to filter store (in session)
Class ilADTSearchBridgeRange.
addToElementId(string $a_add)
Add sub-element.
ADT definition base class.
setSerializedValue(string $a_value)
getLowerADT()
Get lower ADT.
addToParentElement(ilFormPropertyGUI $a_field)
Add form field to parent element.
isInCondition(ilADT $a_adt)