3 require_once
"Services/ADT/classes/Bridges/class.ilADTSearchBridgeMulti.php";
15 $this->search_mode = (int) $a_mode;
26 if ($a_adt_def->
getType() ==
"Enum") {
27 $this->multi_source =
false;
29 $def->setNumeric($a_adt_def->isNumeric());
30 $def->setOptions($a_adt_def->getOptions());
33 $this->multi_source =
true;
41 if ($value !== null) {
42 $this->
getADT()->setSelections($value);
59 $cbox->setValue($this->
getADT()->getSelections());
61 foreach (
$options as $value => $caption) {
63 $cbox->addOption($option);
76 $item->setValue(
$post);
77 } elseif (array_key_exists($this->
getElementId(), $this->table_filter_fields)) {
82 if (is_array(
$post)) {
86 $this->
getADT()->setSelections();
102 if ($this->multi_source) {
103 include_once
"Services/ADT/classes/Types/MultiEnum/class.ilADTMultiEnumDBBridge.php";
106 $mode_concat = ($this->search_mode == self::SEARCH_MODE_ANY)
111 foreach ($this->
getADT()->getSelections() as $item) {
115 $parts[] = $ilDB->like($a_element_id,
"text", $item,
false);
117 return "(" . implode($mode_concat, $parts) .
")";
120 return $ilDB->in($a_element_id, $this->
getADT()->getSelections(),
"",
$type);
132 if ($this->search_mode == self::SEARCH_MODE_ANY) {
133 foreach ((
array) $a_adt->getSelections() as $value) {
140 return !(bool)
sizeof(array_diff(
$current, (
array) $a_adt->getSelections()));
152 return serialize($this->
getADT()->getSelections());
158 $a_value = unserialize($a_value);
159 if (is_array($a_value)) {
160 $this->
getADT()->setSelections($a_value);
convertADTDefinitionToMulti(ilADTDefinition $a_adt_def)
This class represents an option in a checkbox group.
static getInstance()
Get singleton.
extractPostValues(array $a_post=null)
Extract data from (post) values.
shouldBeImportedFromPost($a_post)
Check if incoming values should be imported at all.
importFromPost(array $a_post=null)
readFilter()
Load value(s) from filter store (in session)
getSQLCondition($a_element_id)
Create styles array
The data for the language used.
isValidADTDefinition(ilADTDefinition $a_adt_def)
writeFilter($a_value=null)
Write value(s) to filter store (in session)
isInCondition(ilADT $a_adt)
getType()
Get type (from class/instance)
ADT definition base class.
getElementId()
Get element id.
setSerializedValue($a_value)
addToParentElement(ilFormPropertyGUI $a_field)
Add form field to parent element.
if(!isset($_REQUEST['ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options