3 declare(strict_types=1);
37 if (isset($value) && is_array($value)) {
38 if ($value[
"lower"] ??
false) {
41 if ($value[
"upper"] ??
false) {
58 $check->addSubItem($date_from);
61 $date_from->setDate($this->
getLowerADT()->getDate());
67 $check->addSubItem($date_until);
70 $date_until->setDate($this->
getUpperADT()->getDate());
80 $lower->setShowTime(
true);
81 $item->addCombinationItem(
"lower", $lower, $this->
lng->txt(
"from"));
88 $upper->setShowTime(
true);
89 $item->addCombinationItem(
"upper", $upper, $this->
lng->txt(
"to"));
104 return ($a_post[
'lower'] ??
false) || ($a_post[
'upper'] ??
false);
106 return parent::shouldBeImportedFromPost($a_post);
124 $item->setDate($start);
127 $item->setDate($end);
128 } elseif (array_key_exists($this->
getElementId(), $this->table_filter_fields)) {
129 $this->table_filter_fields[$this->
getElementId()]->getCombinationItem(
"lower")->setDate($start);
130 $this->table_filter_fields[$this->
getElementId()]->getCombinationItem(
"upper")->setDate($end);
132 "lower" => (!$start || $start->isNull()) ? null : $start->get(
IL_CAL_DATETIME),
133 "upper" => (!$end || $end->isNull()) ? null : $end->get(
IL_CAL_DATETIME)
148 public function getSQLCondition(
string $a_element_id,
int $mode = self::SQL_LIKE, array $quotedWords = []): string
153 $sql[] = $a_element_id .
" >= " . $this->db->quote(
159 $sql[] = $a_element_id .
" <= " . $this->db->quote(
164 return "(" . implode(
" AND ", $sql) .
")";
194 return serialize(
$res);
201 $a_value = unserialize($a_value);
202 if (is_array($a_value)) {
203 if (isset($a_value[
"lower"])) {
206 if (isset($a_value[
"upper"])) {
importFromPost(array $a_post=null)
isLargerOrEqual(ilADT $a_adt)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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.
setSerializedValue(string $a_value)
extractPostValues(array $a_post=null)
Extract data from (post) values.
isValidADTDefinition(ilADTDefinition $a_adt_def)
getSQLCondition(string $a_element_id, int $mode=self::SQL_LIKE, array $quotedWords=[])
readFilter()
Load value(s) from filter store (in session)
getUpperADT()
Get upper ADT.
writeFilter($a_value=null)
Write value(s) to filter store (in session)
Class ilADTSearchBridgeRange.
shouldBeImportedFromPost($a_post)
static parseIncomingDate($a_value, bool $a_add_time=false)
Try to parse incoming value to date object.
addToElementId(string $a_add)
Add sub-element.
isInCondition(ilADT $a_adt)
ADT definition base class.
getLowerADT()
Get lower ADT.
addToParentElement(ilFormPropertyGUI $a_field)
Add form field to parent element.