Pane: Utilize query with dashboard when selecting dashlets

This commit is contained in:
Yonas Habteab 2022-04-04 09:46:03 +02:00
parent e2a4e36f17
commit e688d48167

View File

@ -25,13 +25,6 @@ class Pane extends BaseDashboard implements Sortable, OverridingWidget
const TABLE = 'dashboard'; const TABLE = 'dashboard';
/**
* An array of @see Dashlet that are displayed in this pane
*
* @var array
*/
protected $dashlets = [];
/** /**
* Whether this widget overrides another widget * Whether this widget overrides another widget
* *
@ -184,7 +177,9 @@ class Pane extends BaseDashboard implements Sortable, OverridingWidget
public function loadDashboardEntries($name = '') public function loadDashboardEntries($name = '')
{ {
$dashlets = Model\Dashlet::on(Dashboard::getConn())->with('module_dashlet'); $dashlets = Model\Dashlet::on(Dashboard::getConn())
->utilize('dashboard')
->with('module_dashlet');
$dashlets->filter(Filter::equal('dashboard_id', $this->getUuid())); $dashlets->filter(Filter::equal('dashboard_id', $this->getUuid()));
$this->setEntries([]); $this->setEntries([]);