method add documentation in bbn\User\Preferences

Adds a new preference for the given option for the current user and returns the new preference ID.

Example

$pref->add('9439491824ef11eca47652540000cfbe', [ "num" => null, "id_user" => "5d02d5ee269d11eca47652540000cfbe", "id_group" => null, "id_alias" => null, "public" => 0, "id_link" => null, "text" => "Test" ]); // (String) = "3ad7768e30c311eca47652540000cfbe"; function(string $id_option, array $cfg) { if ( ($id_option = $this->_getIdOption($id_option)) && !$this->retrieveUserIds($id_option) && $this->_insert($id_option, $cfg) ) { return $this->db->lastId(); } return null; }

Adds a new preference for the given option for the current user and returns the new preference 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.