method getIdByBit documentation in bbn\User\Preferences

Gets the preference's ID from a bit ID

function(string $id) { if (\bbn\Str::isUid($id) && ($p = $this->getByBit($id))) { return $this->db->selectOne( [ 'table' => $this->class_cfg['table'], 'field' => $this->class_cfg['table'] . '.' . $this->fields['id'], 'join' => [[ 'table' => $this->class_cfg['tables']['user_options_bits'], 'on' => [ 'conditions' => [[ 'field' => $this->class_cfg['arch']['user_options_bits']['id_user_option'], 'exp' => $this->class_cfg['table'] . '.' . $this->fields['id'] ]] ] ]], 'where' => [ $this->class_cfg['tables']['user_options_bits'] . '.' . $this->class_cfg['arch']['user_options_bits']['id'] => $id ] ] ); } return null; }

Gets the preference's ID from a bit ID 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.