Add a group.

@param \KmbDomain\Model\GroupInterface $group
@return RevisionProxy
428221
public function addGroup($group)
    {
        if ($this->groups === null) {
            $this->setGroups($this->groupRepository->getAllByRevision($this));
        }
        $this->groups[] = $group;
        return $this;
    }
509334
public function cacheFlushByGroup($group)
    {
        $group = StringHelper::toUnderscoreVariable(get_called_class()) . '/' . StringHelper::toUnderscoreVariable($group);
        $this->getCache()->setGroup($group)->clear();
        
        return $this;
    }
1330167
public function removeGroup(GroupInterface $group)
	{
		if ($this->inGroup($group))
		{
			$this->remove('groups', $group);
		}

		return true;
	}
1178089
public function edit(AttributeGroup $group)
    {
        $repository = app('TypiCMS\Modules\Attributes\Shells\Repositories\AttributeInterface');
        $models = $repository->allNestedBy('attribute_group_id', $group->id, [], true);
        app('JavaScript')->put('models', $models);

        return view('attributes::admin.edit-group')
            ->with(['model' => $group]);
    }
782584
public function updateGroup (Group $group)
    {
        $json = [
            'group' => [
                'id'   => $group->getID(),
                'name' => $group->getName(),
            ],
        ];

        $request = new Request("POST", "https://api.weixin.qq.com/cgi-bin/groups/update", [], json_encode($json));
        $this->client->send($request);
    }
1286684
public function insertGroup(Group $group)
    {
        $this->om->persist($group);
        $this->eventDispatcher->dispatch('log', 'Log\LogGroupCreate', [$group]);
        $this->om->flush();

        return $group;
    }
728360
private function addGroup($group)
	{
		if($group != null)
		{
			if($this->groups == null)
				$this->groups = array();
			$this->groups[] = $group;
		}
	}
770917
public function addGroup($groupName)
    {
        if (true === is_string($groupName) && false === in_array($groupName, $this->groups)) {
            $this->groups[] = $groupName;
        }
        return $this;
    }
186084
public function addGroup(Group $group)
    {
        if ($this->hasGroup($group)) {
            throw new \InvalidArgumentException(sprintf('Group "%s" is allready defined.', $group->getName()));
        }

        $this->groups[$group->getName()] = $group;

        return $this;
    }
399338
protected function createManialink(Group $group)
    {
        $className = $this->className;

        return new $className($this, $group, $this->name, $this->sizeX, $this->sizeY, $this->posX, $this->posY);
    }
893870
public function attachGroup(TagGroup $group)
    {
        if (!$this->hasGroup($group)) {
            $this->_groups[] = $group;
        }

        return $this;
    }
1343160
public function addApplicationGroups(ApplicationGroup ...$groups)
    {
        foreach ($groups as $group) {
            $this->getApplicationGroups()->add($group);
        }

        return $this;
    }
661942
public function setGroup($group)
    {
        //Argument 1 must be a string or array
        Argument::i()->test(1, 'string', 'array');
            
        if (is_string($group)) {
            $group = array($group);
        }
        
        $this->group = $group;
        return $this;
    }
885710
public function removeGroup(GroupInterface $group): void
    {
        if (!$group instanceof Production) {
            throw new Exception('Group type not supported.');
        }
        $this->groups->removeElement($group);
    }
126993
public function byGroup($group)
    {
        $filtered_messages = $this->filterMessage('group', $group);

        $this->filtered = $filtered_messages;

        return $this;
    }
1128387
public function insertGroup(Group $group)
    {
        $q = $this->dbHandler->createInsertQuery();
        $q->insertInto(
            $this->dbHandler->quoteTable('ezcontentclassgroup')
        )->set(
            $this->dbHandler->quoteColumn('id'),
            $this->dbHandler->getAutoIncrementValue('ezcontentclassgroup', 'id')
        )->set(
            $this->dbHandler->quoteColumn('created'),
            $q->bindValue($group->created, null, \PDO::PARAM_INT)
        )->set(
            $this->dbHandler->quoteColumn('creator_id'),
            $q->bindValue($group->creatorId, null, \PDO::PARAM_INT)
        )->set(
            $this->dbHandler->quoteColumn('modified'),
            $q->bindValue($group->modified, null, \PDO::PARAM_INT)
        )->set(
            $this->dbHandler->quoteColumn('modifier_id'),
            $q->bindValue($group->modifierId, null, \PDO::PARAM_INT)
        )->set(
            $this->dbHandler->quoteColumn('name'),
            $q->bindValue($group->identifier)
        );
        $q->prepare()->execute();

        return $this->dbHandler->lastInsertId(
            $this->dbHandler->getSequenceName('ezcontentclassgroup', 'id')
        );
    }
1134554
public function setGroup($group)
    {
        if (!is_string($group) && $group !== null) {
            throw new InvalidArgumentException(sprintf(
                'Attachment group must be string, received %s',
                is_object($group) ? get_class($group) : gettype($group)
            ));
        }

        $this->group = $group;

        return $this;
    }