poc move logic for single tags to libs, and add lib loading path and name to extra column in tbl_notiztyp

This commit is contained in:
Harald Bamberger
2026-04-09 08:36:13 +02:00
parent 49cbbfc50c
commit fdb037da96
2 changed files with 59 additions and 0 deletions
@@ -0,0 +1,42 @@
<?php
/**
* Description of wh_auto
*
* @author bambi
*/
class CoreWiederholerTagLib
{
protected $ci;
public function __construct()
{
$this->ci = get_instance();
$this->ci->load->model('crm/Prestudentstatus_model', 'PrestudentstatusModel');
}
public function getZuordnungIds(array $params)
{
if(!isset($params['studiensemester_kurzbz']))
{
return (object) array(
'prestudent_id' => []
);
}
$semester = $params['studiensemester_kurzbz'];
$result = $this->ci->PrestudentstatusModel-> loadWhere(array(
'statusgrund_id' => 16,
'studiensemester_kurzbz' => $semester
));
$data = $result->retval;
$ids = array_map(function($item) {
return $item->prestudent_id;
}, $data);
return (object) array(
'prestudent_id' => $ids
);
}
}