3 require_once
"Services/ADT/classes/Bridges/class.ilADTSearchBridgeSingle.php";
24 $this->
getADT()->setText($value);
35 $text->setMaxLength(512);
36 $text->setSubmitFormOnEnter(
true);
38 $text->setValue($this->
getADT()->getText());
52 $item->setValue($post);
54 else if(array_key_exists($this->
getElementId(), $this->table_filter_fields))
56 $this->table_filter_fields[$this->
getElementId()]->setValue($post);
60 $this->
getADT()->setText($post);
65 $this->
getADT()->setText();
72 public function getSQLCondition($a_element_id, $a_mode = self::SQL_LIKE, $a_value = null)
82 $a_value = $this->
getADT()->getText();
87 case self::SQL_STRICT:
88 if(!is_array($a_value))
90 return $a_element_id.
" = ".$ilDB->quote($a_value,
"text");
94 return $ilDB->in($a_element_id, $a_value,
"",
"text");
99 if(!is_array($a_value))
101 return $ilDB->like($a_element_id,
"text",
"%".$a_value.
"%");
106 foreach($a_value as $word)
110 $tmp[] = $ilDB->like($a_element_id,
"text",
"%".$word.
"%");
115 return "(".implode(
" OR ", $tmp).
")";
120 case self::SQL_LIKE_END:
121 if(!is_array($a_value))
123 return $ilDB->like($a_element_id,
"text", $a_value.
"%");
127 case self::SQL_LIKE_START:
128 if(!is_array($a_value))
130 return $ilDB->like($a_element_id,
"text",
"%".$a_value);
139 return $this->
getADT()->equals($a_adt);
149 return serialize(array($this->
getADT()->getText()));
155 $a_value = unserialize($a_value);
156 if(is_array($a_value))
158 $this->
getADT()->setText($a_value[0]);