mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-14 10:39:27 +00:00
Added getAutocompleteSuggestions method to OE Model
Get OEs by eventQuery string. Use with autocomplete event queries.
This commit is contained in:
@@ -188,4 +188,20 @@ class Organisationseinheit_model extends DB_Model
|
||||
}
|
||||
return $this->loadWhere($condition);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get OEs by eventQuery string. Use with autocomplete event queries.
|
||||
* @param $eventQuery String
|
||||
* @return array
|
||||
*/
|
||||
public function getAutocompleteSuggestions($eventQuery)
|
||||
{
|
||||
$this->addSelect('oe_kurzbz');
|
||||
$this->addSelect('organisationseinheittyp_kurzbz, oe_kurzbz, bezeichnung, aktiv, lehre');
|
||||
$this->addOrder('organisationseinheittyp_kurzbz, bezeichnung');
|
||||
|
||||
return $this->loadWhere("
|
||||
oe_kurzbz ILIKE '%". $this->escapeLike($eventQuery). "%'
|
||||
");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user