3declare(strict_types=1);
35 $this->search_mode = $a_mode;
51 if ($a_adt_def->
getType() ==
"Enum") {
52 $this->multi_source =
false;
54 $def->setNumeric($a_adt_def->isNumeric());
55 $def->setOptions($a_adt_def->getOptions());
58 $this->multi_source =
true;
66 if ($value !==
null) {
67 if (is_string($value)) {
70 $this->
getADT()->setSelections($value);
78 $def = $this->
getADT()->getCopyOfDefinition();
80 $options = $def->getOptions();
84 $cbox->setValue($this->
getADT()->getSelections());
86 foreach ($options as $value => $caption) {
88 $cbox->addOption($option);
101 $item->setValue(
$post);
102 } elseif (array_key_exists($this->
getElementId(), $this->table_filter_fields)) {
107 if (is_array(
$post)) {
111 $this->
getADT()->setSelections();
113 if (array_key_exists($this->
getElementId(), $this->table_filter_fields)) {
122 public function getSQLCondition(
string $a_element_id,
int $mode = self::SQL_LIKE, array $quotedWords = []): string
125 return $this->db->in(
127 (array) $this->
getADT()->getSelections(),
139 $current = $this->
getADT()->getSelections();
140 if (is_array($current) &&
143 if ($this->search_mode == self::SEARCH_MODE_ANY) {
144 foreach ((array) $a_adt->getSelections() as $value) {
145 if (in_array($value, $current)) {
151 return !count(array_diff($current, (array) $a_adt->getSelections()));
162 return serialize($this->
getADT()->getSelections());
169 $a_value = unserialize($a_value);
170 if (is_array($a_value)) {
171 $this->
getADT()->setSelections($a_value);
ADT definition base class.
getType()
Get type (from class/instance)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
isInCondition(ilADT $a_adt)
Compare directly against ADT.
getSerializedValue()
Get current value(s) in serialized form (for easy persisting)
addToForm()
Add ADT-specific fields to form.
setSearchMode(int $a_mode)
convertADTDefinitionToMulti(ilADTDefinition $a_adt_def)
getSQLCondition(string $a_element_id, int $mode=self::SQL_LIKE, array $quotedWords=[])
Get SQL condition for current value(s)
isValidADTDefinition(ilADTDefinition $a_adt_def)
importFromPost(array $a_post=null)
loadFilter()
Load filter value(s) into ADT.
setSerializedValue(string $a_value)
Set current value(s) in serialized form (for easy persisting)
Class ilADTSearchBridgeMulti.
readFilter()
Load value(s) from filter store (in session)
extractPostValues(array $a_post=null)
Extract data from (post) values.
addToParentElement(ilFormPropertyGUI $a_field)
Add form field to parent element.
shouldBeImportedFromPost($a_post)
Check if incoming values should be imported at all.
writeFilter($a_value=null)
Write value(s) to filter store (in session)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...