method insert documentation in bbn\Appui\Dashboard
Creates a new dashboard
function(array $d)
{
if (empty($d['code'])) {
throw new \Exception(_("The dashboard's code is mandatory"));
}
if (empty($d[$this->archPref['text']])) {
throw new \Exception(_("The dashboard's text is mandatory"));
}
if ($this->db->insert(
$this->cfgPref['table'],
[
$this->archPref['id_option'] => $this->idList,
$this->archPref['num'] => $d[$this->archPref['num']] ?? null,
$this->archPref['text'] => $d[$this->archPref['text']],
$this->archPref['id_link'] => !empty($d[$this->archPref['id_link']]) ? $d[$this->archPref['id_link']] : null,
$this->archPref['id_alias'] => !empty($d[$this->archPref['id_alias']]) ? $d[$this->archPref['id_alias']] : null,
$this->archPref['id_user'] => !empty($d[$this->archPref['id_user']]) ? $d[$this->archPref['id_user']] : null,
$this->archPref['id_group'] => !empty($d[$this->archPref['id_group']]) ? $d[$this->archPref['id_group']] : null,
$this->archPref['public'] => empty($d[$this->archPref['public']]) ? 0 : 1,
$this->archPref['cfg'] => ($cfg = $this->pref->getCfg(false, $d)) ? json_encode($cfg) : null
]
)) {
return $this->db->lastId();
}
return null;
}
Creates a new dashboard 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