Method | Description | |
---|---|---|
__construct ( Turba_Driver $driver, array $attributes = [], array $options = [] ) | Constructs a new Turba_Object_Group. | |
addMember ( string $contactId, string $sourceId = null ) | Adds a new contact entry to this group. | |
count ( ) : integer | Count the number of contacts in this group. | |
createGroup ( string $source, array $members, array $opts = [] ) : object | Add members to a group, creating the group if necessary. | |
isGroup ( ) : boolean | Returns true if this object is a group of multiple contacts. | |
listMembers ( array $sort = null ) : Turba_List | Retrieve the Objects in this group | |
removeMember ( string $contactId, string $sourceId = null ) | Deletes a contact from this group. | |
url ( $view = null, $full = false ) : Horde_Url | Contact url. |
Method | Description | |
---|---|---|
_ensureEmail ( ) |
public __construct ( Turba_Driver $driver, array $attributes = [], array $options = [] ) | ||
$driver | Turba_Driver | The driver object that this group comes from. |
$attributes | array | Hash of attributes for this group. |
$options | array | Hash of options for this object. @since Turba 4.2 |
public static createGroup ( string $source, array $members, array $opts = [] ) : object | ||
$source | string | Destination source. |
$members | array | Members of the group. Array of two-element arrays: source and key. |
$opts | array | Additional options:
- attr: (array) Array of attributes to use to create a new group. This should include 'name' at a minimum. - gid: (string) Existing Group ID. - name: (string) Group Name. |
return | object | Object with the following properties:
- errors: (array) List of errors when adding members. - group: (Turba_Object_Group) Group object. - success: (integer) Number of members sucessfully added. |
public listMembers ( array $sort = null ) : Turba_List | ||
$sort | array | The requested sort order which is passed to Turba_List::sort(). |
return | Turba_List | List containing the members of this group |
public removeMember ( string $contactId, string $sourceId = null ) | ||
$contactId | string | The id of the contact to remove. |
$sourceId | string | The source $contactId is from. |
public url ( $view = null, $full = false ) : Horde_Url | ||
return | Horde_Url |