Files
FHC-Core/application/models/ressource/Funktion_model.php
T
ma0068 c26bb98960 new Core Component Function
- autocomplete and dropdown field for search oes and search functions with active and non active entries
- possibility to dynamic styling of display switch, newButton in Tabulator, different editLabels
- possibility to show/hide column company
- possibility to show/hide to save function as copy
2025-05-21 15:34:43 +02:00

37 lines
807 B
PHP

<?php
class Funktion_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'public.tbl_funktion';
$this->pk = 'funktion_kurzbz';
}
/**
* Get Functions by eventQuery string. Use with autocomplete event queries in Function Component
* @param $eventQuery String
* @return array
*/
public function getAutocompleteSuggestions($eventQuery)
{
$this->addSelect('funktion_kurzbz, beschreibung, aktiv');
$this->addSelect("beschreibung AS label");
$this->addOrder('beschreibung', 'ASC');
if($eventQuery === null)
{
return $this->load();
}
return $this->loadWhere("
funktion_kurzbz ILIKE '%". $this->escapeLike($eventQuery). "%'
OR beschreibung ILIKE '%". $this->escapeLike($eventQuery). "%'
");
}
}