19 declare(strict_types=1);
42 $this->title_query = $query;
67 if ($value !==
null && $value !==
'') {
68 $this->
getADT()->setTargetRefId(1);
80 $item->setValue(
$post);
82 $this->
getADT()->setTargetRefId(1);
83 } elseif (array_key_exists($this->
getElementId(), $this->table_filter_fields)) {
87 $this->
getADT()->setTargetRefId(1);
104 public function getSQLCondition(
string $a_element_id,
int $mode = self::SQL_LIKE, array $quotedWords = []): string
111 $a_value = $this->
getADT()->getTargetRefId();
112 } elseif (count($quotedWords)) {
113 $a_value = $quotedWords[0];
115 if (!strlen($a_value)) {
119 $subselect = $a_element_id .
' IN ' .
120 '( select ref_id from object_reference obr join object_data obd on obr.obj_id = obd.obj_id ' .
121 'where ' . $this->db->like(
'title',
'text', $a_value .
'%') .
' ' .
133 if ($this->
getADT()->getCopyOfDefinition()->isComparableTo($a_adt)) {
134 $ref_id = $a_adt->getTargetRefId();
139 return str_contains(
$title, $query);
151 return serialize(array($this->
getADT()->getTargetRefId()));
162 $a_value = unserialize($a_value);
163 if (is_array($a_value)) {
164 $this->
getADT()->setTargetRefId($a_value[0]);
loadFilter()
Load from filter.
importFromPost(?array $a_post=null)
external link search bridge
static _lookupObjId(int $ref_id)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
shouldBeImportedFromPost($a_post)
Check if incoming values should be imported at all.
static _lookupTitle(int $obj_id)
readFilter()
Load value(s) from filter store (in session)
Class ilADTSearchBridgeSingle.
getSerializedValue()
get serialized value
setSerializedValue(string $a_value)
Set serialized value.
isInCondition(ilADT $a_adt)
Is in condition.
getSQLCondition(string $a_element_id, int $mode=self::SQL_LIKE, array $quotedWords=[])
Get sql condition.
setTitleQuery(string $query)
isValidADTDefinition(\ilADTDefinition $a_adt_def)
Is valid type.
extractPostValues(?array $a_post=null)
Extract data from (post) values.
writeFilter($a_value=null)
Write value(s) to filter store (in session)
ADT definition base class.
addToParentElement(ilFormPropertyGUI $a_field)
Add form field to parent element.