+ 'record_type' => $this->teamData['RECORD_TYPE'],
+ 'bcc_email' => $this->teamData['BCC_EMAIL'],
+ 'plugins' => $this->teamData['PLUGINS'],
+ 'lock_spec' => $this->teamData['LOCK_SPEC'],
+ 'workday_minutes' => $this->teamData['WORKDAY_MINUTES'],
+ 'config' => $this->teamData['CONFIG']));
+ if ($group_id) {
+ $this->group_id = $group_id;
+
+ // Create roles.
+ foreach ($this->roles as $key=>$role_item) {
+ $role_id = ttRoleHelper::insert(array(
+ 'group_id' => $this->group_id,
+ 'name' => $role_item['NAME'],
+ 'rank' => $role_item['RANK'],
+ 'rights' => $role_item['RIGHTS'],
+ 'status' => $role_item['STATUS']));
+ $this->roleMap[$role_item['ID']] = $role_id;
+ }
+