public function add(string $id_option = null, array $cfg): ?string
  {
    return (
      ($id_option = $this->_get_id_option($id_option)) &&
      $this->_insert($id_option, $cfg)
    ) ? $this->db->last_id() : null;
  }
public function add(string $id_option = null, array $cfg): ?string
  {
    return (
      ($id_option = $this->_get_id_option($id_option)) &&
      $this->_insert($id_option, $cfg)
    ) ? $this->db->last_id() : null;
  }
public function add ( string $ id_option = null , array $ cfg ) : ? string { return ( ( $ id_option = $ this -> _get_id_option ( $ id_option ) ) && $ this -> _insert ( $ id_option , $ cfg ) ) ? $ this -> db -> last_id ( ) : null ; }
Adds a new preference for the given option for the current user.

@param null|string $id_option
@param array $cfg
@return null|string
Adds a new preference for the given option for the current user .