mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-22 17:32:18 +00:00
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:
@@ -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
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user