Widget controller & model & table

This commit is contained in:
cgfhtw
2022-10-12 08:58:48 +02:00
parent a3ad8eb337
commit 39bbcac217
6 changed files with 68 additions and 32 deletions
@@ -0,0 +1,24 @@
<?php
class Dashboard_Widget_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = 'dashboard.tbl_widget';
$this->pk = 'widget_id';
}
public function getAllForDashboard($db)
{
$this->addSelect($this->dbTable . '.*');
$this->addJoin('dashboard.tbl_dashboard_widget', 'widget_id');
$this->addJoin('dashboard.tbl_dashboard', 'dashboard_id');
return $this->loadWhere(['dashboard_kurzbz' => $db]);
}
}