method shareWithGroup documentation in bbn\User\Preferences

Shares (or unshares) the given preference to the given group.

function(string $id, string $id_group, bool $cancel = false) { if ($cfg = $this->get($id)) { $id_share = $this->db->selectOne( $this->class_table, $this->fields['id'], [ 'id_alias' => $id, 'id_group' => $id_group ] ); if ($cancel && $id_share) { return $this->db->delete($this->class_table, [$this->fields['id'] => $id_share]); } elseif (!$cancel && !$id_share) { return $this->db->insert( $this->class_table, [ 'id_option' => $cfg['id_option'], 'id_alias' => $id, 'id_group' => $id_group ] ); } return 0; } return null; }

Shares (or unshares) the given preference to the given group. 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.