method getCfg documentation in bbn\User\Preferences
Gets the cfg array, normalized either from the DB or from the $cfg argument.
function(string $id = NULL, array $cfg = NULL)
{
if (
(null !== $cfg)
|| ($cfg = $this->db->selectOne(
$this->class_cfg['table'],
$this->fields['cfg'],
[$this->fields['id'] => $id ]
))
) {
if (bbn\Str::isJson($cfg)) {
$cfg = json_decode($cfg, 1);
}
if (\is_array($cfg)) {
$new = [];
foreach ($cfg as $k => $v) {
if (!\in_array($k, $this->fields, true)) {
$new[$k] = $v;
}
}
return $new;
}
}
return null;
}
Gets the cfg array, normalized either from the DB or from the $cfg argument. 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-2025
BBN Solutions