Add group

@param \TechPromux\DynamicQueryBundle\Entity\DataModelGroup $group

@return MetadataField
163824
public function addGroup(\TechPromux\DynamicQueryBundle\Entity\DataModelGroup $group)
    {
        $this->groups[] = $group;

        return $this;
    }
290269
protected function findAccountsForGroupUsingGroupAttribute(Entity\GroupNode $group)
    {
        $groupAttrValues = $group->getRawLdapNode()->getAttribute($this->getConfiguration()->getGroupMembersAttribute());

        $filterProperty = '';

        switch ($this->getConfiguration()->getGroupMembersAttributeMappingType()) {
            case Enum\GroupMembersMappingType::DN:
                return new Collection\GroupNodeCollection(new Collection\DnIterator($this->connection, array($groupAttrValues)));
            case Enum\GroupMembersMappingType::USERNAME:
                $filterProperty = $this->getConfiguration()->getAccountUsernameAttribute();
                break;

            case Enum\GroupMembersMappingType::UNIQUE_ID:
                $filterProperty = $this->getConfiguration()->getAccountUniqueIdAttribute();
                break;
        }

        $filters = array();

        foreach ($groupAttrValues as $groupAttrValue) {
            $filters[] = new Filter\StringFilter($filterProperty . '=' . Filter\AbstractFilter::escapeValue($groupAttrValue));
        }

        return $this->searchNodes(
            $this->buildFilter(
                new Filter\OrFilter($filters)
            )
        );
    }
352661
public function addGroup(ChildGroup $l)
    {
        if ($this->collGroups === null) {
            $this->initGroups();
            $this->collGroupsPartial = true;
        }

        if (!$this->collGroups->contains($l)) {
            $this->doAddGroup($l);
        }

        return $this;
    }
1035519
public function addConfigGroup(\VinceT\AdminConfigurationBundle\Entity\ConfigGroup $configGroup)
    {
        $this->configGroups[] = $configGroup;

        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;
    }
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;
    }
769727
public function setGroup(string $group, array $groupMessage)
    {
        return $this->setAndroidGroup($group, $groupMessage)
            ->setAmazonGroup($group, $groupMessage);
    }
1231333
public function importMembersAction(Group $group)
    {
        $this->throwsExceptionIfNotAdmin();

        return $this->groupManager->importMembers(file_get_contents($this->request->files->get('csv')), $group);
    }
777107
public function getGroup($group)
    {
        $timeStamp = time();
        if ($group instanceof BundleEntity\MemberGroup) {
            return new ModelResponse($group, 1, 0, null, false, 'S:D:002', 'Entries successfully fetched from database.', $timeStamp, time());
        }
        $result = null;
        switch ($group) {
            case is_numeric($group):
                $result = $this->em->getRepository($this->entity['mg']['name'])->findOneBy(array('id' => $group));
                break;
            case is_string($group):
                $result = $this->em->getRepository($this->entity['mg']['name'])->findOneBy(array('code' => $group));
                break;
        }
        if (is_null($result)) {
            return new ModelResponse($result, 0, 0, null, true, 'E:D:002', 'Unable to find request entry in database.', $timeStamp, time());
        }

        return new ModelResponse($result, 1, 0, null, false, 'S:D:002', 'Entries successfully fetched from database.', $timeStamp, time());
    }
399338
protected function createManialink(Group $group)
    {
        $className = $this->className;

        return new $className($this, $group, $this->name, $this->sizeX, $this->sizeY, $this->posX, $this->posY);
    }
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);
    }
1281749
public function set_group( Field $group ) {
		$this->group = $group;

		$this->form    = $this->group->get_form();
		$this->storage = $this->group->get_storage();

		return $this;
	}
24239
public function addMetadata(\TechPromux\DynamicQueryBundle\Entity\Metadata $metadata)
    {
        $this->metadatas[] = $metadata;

        return $this;
    }
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;
    }
1236518
public function groupBy($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;
    }
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);
    }
1282801
public function assignGroup($group)
    {
        if (Group::count() === 0) {
            throw new \Exception('No groups have been created.');
        }

        return $this->groups()->save(
            Group::whereName($group)->firstOrFail()
        );
    }