Object constructor
rcube_contacts
__construct
(object Instance $dbconn, integer $user)
-
object Instance
$dbconn: of the rcube_db class
-
integer
$user: User-ID
Add the given contact records the a certain group
int
add_to_group
(string $group_id, array $ids)
-
string
$group_id: Group identifier
-
array
$ids: List of contact identifiers to be added
Redefinition of:
- rcube_addressbook::add_to_group()
- Add the given contact records the a certain group
Count number of available contacts in database
Redefinition of:
- rcube_addressbook::count()
- Count number of available contacts in database
Create a contact group with the given name
mixed
create_group
(string $name)
-
string
$name: The group name
Redefinition of:
- rcube_addressbook::create_group()
- Create a contact group with the given name
Mark one or more contact records as deleted
void
delete
(array $ids, [boolean $force = true])
-
array
$ids: Record identifiers
-
boolean
$force: Remove record(s) irreversible (unsupported)
Redefinition of:
- rcube_addressbook::delete()
- Mark one or more contact records as deleted
Delete the given group (and all linked group members)
boolean
delete_group
(string $gid)
-
string
$gid: Group identifier
Redefinition of:
- rcube_addressbook::delete_group()
- Delete the given group and all linked group members
Get group properties such as name and email address(es)
array
get_group
(string $group_id)
-
string
$group_id: Group identifier
Redefinition of:
- rcube_addressbook::get_group()
- Get group properties such as name and email address(es)
Returns addressbook name
void
get_name
()
Redefinition of:
- rcube_addressbook::get_name()
- Returns addressbook name (e.g. for addressbooks listing)
Get a specific contact record
mixed
get_record
(mixed $id, [ $assoc = false])
-
mixed
$id: record identifier(s)
-
$assoc
Redefinition of:
- rcube_addressbook::get_record()
- Get a specific contact record
Get group assignments of a specific contact record
array
get_record_groups
(mixed $id)
-
mixed
$id: Record identifier
Redefinition of:
- rcube_addressbook::get_record_groups()
- Get group assignments of a specific contact record
Create a new contact record
integer|boolean
insert
(array $save_data, [ $check = false])
-
array
$save_data: Associative array with save data
-
$check
Redefinition of:
- rcube_addressbook::insert()
- Create a new contact record
List all active contact groups of this source
array
list_groups
([string $search = null])
-
string
$search: Search string to match group name
Redefinition of:
- rcube_addressbook::list_groups()
- List all active contact groups of this source
List the current set of contact records
array
list_records
([array $cols = null], [int $subset = 0], [boolean $nocount = false])
-
array
$cols: List of cols to show, Null means all
-
int
$subset: Only return this number of records, use negative values for tail
-
boolean
$nocount: True to skip the count query (select only)
Redefinition of:
- rcube_addressbook::list_records()
- List the current set of contact records
Remove the given contact records from a certain group
int
remove_from_group
(string $group_id, array $ids)
-
string
$group_id: Group identifier
-
array
$ids: List of contact identifiers to be removed
Redefinition of:
- rcube_addressbook::remove_from_group()
- Remove the given contact records from a certain group
Rename a specific contact group
boolean
rename_group
(string $gid, string $newname, &$new_gid)
-
string
$gid: Group identifier
-
string
$newname: New name to set for this group
-
&$new_gid
Redefinition of:
- rcube_addressbook::rename_group()
- Rename a specific contact group
Reset all saved results and search parameters
void
reset
()
Redefinition of:
- rcube_addressbook::reset()
- Reset saved results and search parameters
Search contacts
object rcube_result_set
search
(
mixed $fields,
mixed $value, [
int $mode =
0], [
boolean $select =
true], [
boolean $nocount =
false], [
array $required =
array()])
-
mixed
$fields: The field name of array of field names to search in
-
mixed
$value: Search value (or array of values when $fields is array)
-
int
$mode: Matching mode:
- - partial (*abc*),
- - strict (=),
- - prefix (abc*)
-
boolean
$select: True if results are requested, False if count only
-
boolean
$nocount: True to skip the count query (select only)
-
array
$required: List of fields that cannot be empty
Redefinition of:
- rcube_addressbook::search()
- Search records
Setter for the current group
(empty, has to be re-implemented by extending class)
void
set_group
( $gid)
Redefinition of:
- rcube_addressbook::set_group()
- Setter for the current group
Save a search string for future listings
void
set_search_set
(string $filter)
-
string
$filter: SQL params to use in listing method
Redefinition of:
- rcube_addressbook::set_search_set()
- Save a search string for future listings
Undelete one or more contact records
void
undelete
(array $ids)
-
array
$ids: Record identifiers
Redefinition of:
- rcube_addressbook::undelete()
- Unmark delete flag on contact record(s)
Update a specific contact record
boolean
update
(mixed $id, array $save_cols)
-
mixed
$id: Record identifier
-
array
$save_cols: Assoziative array with save data
Redefinition of:
- rcube_addressbook::update()
- Update a specific contact record
Check the given data before saving.
If input not valid, the message to display can be fetched using get_error()
boolean
validate
(array &$save_data, [boolean $autofix = false])
-
array
&$save_data: Assoziative array with data to save
-
boolean
$autofix: Try to fix/complete record automatically
Redefinition of:
- rcube_addressbook::validate()
- Check the given data before saving.
Inherited Methods
Inherited From rcube_addressbook
rcube_addressbook::add_to_group()
rcube_addressbook::close()
rcube_addressbook::compose_display_name()
rcube_addressbook::compose_list_name()
rcube_addressbook::count()
rcube_addressbook::create_group()
rcube_addressbook::delete()
rcube_addressbook::delete_all()
rcube_addressbook::delete_group()
rcube_addressbook::get_col_values()
rcube_addressbook::get_error()
rcube_addressbook::get_group()
rcube_addressbook::get_name()
rcube_addressbook::get_record()
rcube_addressbook::get_record_groups()
rcube_addressbook::get_result()
rcube_addressbook::get_search_set()
rcube_addressbook::insert()
rcube_addressbook::insertMultiple()
rcube_addressbook::list_groups()
rcube_addressbook::list_records()
rcube_addressbook::normalize_string()
rcube_addressbook::refresh_search()
rcube_addressbook::remove_from_group()
rcube_addressbook::rename_group()
rcube_addressbook::reset()
rcube_addressbook::search()
rcube_addressbook::set_error()
rcube_addressbook::set_group()
rcube_addressbook::set_page()
rcube_addressbook::set_pagesize()
rcube_addressbook::set_search_set()
rcube_addressbook::set_sort_order()
rcube_addressbook::undelete()
rcube_addressbook::update()
rcube_addressbook::validate()