method deleteWidget documentation in bbn\Appui\Dashboard
Removes a widget (Bit)
function(string $id)
{
if (!Str::isUid($id)) {
throw new \Exception(_("The id must be a uuid"));
}
$res = false;
if ($this->_check() && $this->pref->deleteBit($id)) {
$res = true;
if ($alias = $this->db->selectAll($this->cfgPref['table'], [], [$this->archPref['id_alias'] => $this->id])) {
foreach ($alias as $a) {
if (($cfg = \json_decode($a->{$this->archPref['cfg']}, true))
&& isset($cfg['widget'], $cfg['widget'][$id])
) {
unset($cfg['widget'][$id]);
if (!$this->pref->setCfg($a->${$this->archPref['id']}, $cfg)) {
$res = false;
}
}
}
}
}
return $res;
}
Removes a widget (Bit) BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way
This website uses cookies to ensure you get the best experience on our website.
© 2011-2024
BBN Solutions