$contact->addToGroup($group)

Adds this contact to a group.

Arguments:
- $group (Telerivet_Group)
Required
347758
function addToGroup($group)
    {
        $this->_api->doRequest("PUT", "{$group->getBaseApiPath()}/contacts/{$this->id}");               
        $this->_group_ids_set[$group->id] = true;        
    }
754549
public static function addGroup($group) {
		
		if(false === is_array($group)) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type array, "%s" given', __METHOD__, gettype($group)), E_USER_ERROR);
		}

		static :: $group[] = $group;
	}
1239855
public function addGroup(\Enhavo\Bundle\NewsletterBundle\Entity\Group $group)
    {
        $this->group[] = $group;

        return $this;
    }
797473
public function addGroup(GroupInterface $group)
    {
        if (Credentials::check()) {
            RevisionRepository::create([
                'revisionable_type' => get_class($this),
                'revisionable_id'   => $this->getKey(),
                'key'               => 'added_group',
                'old_value'         => null,
                'new_value'         => $group->getName(),
                'user_id'           => Credentials::getUser()->id,
            ]);
        }

        return parent::addGroup($group);
    }
118321
public function addGroup(string $groupName, DataModifierGroup $group) : self
    {
        $this->dataModifierGroups[$groupName] = $group;

        return $this;
    }
503590
private function loadPsr4Group($group)
    {
        if ( !isset($group['psr4']))
        {
            return;
        }

        foreach ($group['psr4'] as $prefix => $paths)
        {
            $this->objectRegistry->addPsr4($prefix, $paths);
        }
    }
342380
public function addGroup($group, $action, $priority = 0)
    {
        $this->assertNotFrozen();

        if (!empty($this->initialData[self::GROUPS][$action])) {
            foreach ($this->initialData[self::GROUPS][$action] as $existingGroup => $existingPriority) {
                if ($group !== $existingGroup && $priority === $existingPriority) {
                    throw new \InvalidArgumentException(
                        \sprintf(
                            'The priority %s cannot be used for the group "%s"'
                            . ' because the group with this priority already exists.'
                            . ' Existing group: "%s". Action: "%s".',
                            $priority,
                            $group,
                            $existingGroup,
                            $action
                        )
                    );
                }
            }
        }

        $this->initialData[self::GROUPS][$action][$group] = $priority;
    }
990776
function addGroup(group, options) {
  options = _.opts(options, {gid: null});
  if (!runningAsRoot()) return;
  if (!group) throw new Error('You must provide a group');
  if (groupExists(group)) {
    return;
  }

  if (isPlatform('linux')) {
    _addGroupLinux(group, options);
  } else if (isPlatform('osx')) {
    _addGroupOsx(group, options);
  } else if (isPlatform('windows')) {
    throw new Error(`Don't know how to add group ${group} on Windows`);
  } else {
    throw new Error(`Don't know how to add group ${group} in current platform`);
  }
}
715333
private function addGroup(MenuGroup $group)
    {
        if (!$this->hasGroup($group->getName())) {
            $this->groups[$group->getName()] = $group;
        }
    }
428221
public function addGroup($group)
    {
        if ($this->groups === null) {
            $this->setGroups($this->groupRepository->getAllByRevision($this));
        }
        $this->groups[] = $group;
        return $this;
    }
311994
public function addOption(Option $option, $group = null)
    {
        $options = [$option];

        if ($group === null) {
            $group = $this->currentGroup;
        }

        $this->setOptions($options, $group);

        return $this;
    }
41226
function add_to_group($group_id, $contact_ids)
    {
        $group_cache = $this->_fetch_groups();
        $member_attr = $group_cache[$group_id]['member_attr'];
        $group_dn    = $group_cache[$group_id]['dn'];
        $new_attrs   = array();

        if (!is_array($contact_ids)) {
            $contact_ids = explode(',', $contact_ids);
        }

        foreach ($contact_ids as $id) {
            $new_attrs[$member_attr][] = self::dn_decode($id);
        }

        if (!$this->ldap->mod_add($group_dn, $new_attrs)) {
            $this->set_error(self::ERROR_SAVING, 'errorsaving');
            return 0;
        }

        if ($this->cache) {
            $this->cache->remove('groups');
        }

        return count($new_attrs[$member_attr]);
    }
850661
public function sendCreateGroupMail( $group ) {

		$fromEmail	= $this->mailProperties->getSenderEmail();
		$fromName	= $this->mailProperties->getSenderName();

		$email = Yii::$app->factory->get( 'groupService' )->getEmail( $group );

		if( !empty( $email ) ) {

			// Send Mail
			$this->getMailer()->compose( self::MAIL_GROUP_CREATE, [ 'coreProperties' => $this->coreProperties, 'group' => $group, 'email' => $email ] )
				->setTo( $email )
				->setFrom( [ $fromEmail => $fromName ] )
				->setSubject( "Group Registration | " . $this->coreProperties->getSiteName() )
				//->setTextBody( "text" )
				->send();
		}
	}
756628
function group($group)
    {
        if (!empty($group))
        {
            self::sql_safe($group);
            $this->group = "group by $group";
        }
        else
        {
            $this->group = '';
        }
    }
1192025
def add_update_callback(self, group=None, name=None, cb=None):
        
        if not group and not name:
            self.all_update_callback.add_callback(cb)
        elif not name:
            if group not in self.group_update_callbacks:
                self.group_update_callbacks[group] = Caller()
            self.group_update_callbacks[group].add_callback(cb)
        else:
            paramname = '{}.{}'.format(group, name)
            if paramname not in self.param_update_callbacks:
                self.param_update_callbacks[paramname] = Caller()
            self.param_update_callbacks[paramname].add_callback(cb)
1070295
public function addGroup(Group $group)
    {
        $this->hasGroupsProperty();

        if (!$this->groups->contains($group)) {
            $this->groups->add($group);
        }
    }
370782
protected function loadByGroup(/*# string */ $group)
    {
        // load super global
        if ('' !== $group && '_' === $group[0]) {
            return $this->loadGlobal($group);
        }

        // load from config
        $conf = $this->loader->load($group);

        foreach ($conf as $grp => $data) {
            $this->config->addNode($grp, $data);
        }

        return $this;
    }