method fixBitsOrder documentation in bbn\User\Preferences
function(string $id_user_option, string $id_parent = NULL, $deep = false)
{
if (
\bbn\Str::isUid($id_user_option)
&& (\bbn\Str::isUid($id_parent) || \is_null($id_parent))
) {
$cfg = $this->class_cfg['arch']['user_options_bits'];
$fixed = 0;
foreach ($this->getBits($id_user_option, $id_parent, false) as $i => $b) {
if ($deep) {
$fixed += $this->fixBitsOrder($id_user_option, $b[$cfg['id']], $deep);
}
if ($b[$cfg['num']] !== ($i + 1)) {
$fixed += $this->db->update($this->class_cfg['tables']['user_options_bits'], [$cfg['num'] => $i + 1], [$cfg['id'] => $b[$cfg['id']]]);
}
}
return $fixed;
}
return null;
}
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