Instantiate the classes for a group

@param array $group The group
778592
private function instantiateGroup($group)
    {
        if ( !isset($group['instantiate']))
        {
            return;
        }

        foreach ($group['instantiate'] as $nickname => $className)
        {
            $this->objectRegistry->register($nickname, new $className());
        }
    }
457660
public function addGroup(Group $group)
    {
        $this->groups->put($group->getName(), $group);

        return $this;
    }
1154207
public static function getInstance($group)
	{
		static $instances;

		// Set instances array
		if (!isset($instances))
		{
			$instances = array();
		}

		// Do we have a matching instance?
		if (!isset($instances[$group]))
		{
			// If an ID is passed, check for a match in existing instances
			if (is_numeric($group))
			{
				foreach ($instances as $instance)
				{
					if ($instance && $instance->get('gidNumber') == $group)
					{
						// Match found
						return $instance;
						break;
					}
				}
			}

			// No matches
			// Create group object
			$hzg = new self();

			if ($hzg->read($group) === false)
			{
				$instances[$group] = false;
			}
			else
			{
				$instances[$group] = $hzg;
			}
		}

		// Return instance
		return $instances[$group];
	}
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;
    }
557050
public function addGroup($group) {
    if (!$group->inArray((array) $this->groups)) {
      $this->groups[] = $group;
      return $this->groups;
    }
    return true;
  }
1070295
public function addGroup(Group $group)
    {
        $this->hasGroupsProperty();

        if (!$this->groups->contains($group)) {
            $this->groups->add($group);
        }
    }
20647
public function formProperties(array $group = null)
    {
        $obj   = $this->obj();
        $props = $obj->metadata()->properties();

        // We need to sort form properties by form group property order if a group exists
        if (!empty($group)) {
            $props = array_merge(array_flip($group), $props);
        }

        foreach ($props as $propertyIdent => $propertyMetadata) {
            if (method_exists($obj, 'filterPropertyMetadata')) {
                $propertyMetadata = $obj->filterPropertyMetadata($propertyMetadata, $propertyIdent);
            }

            if (!is_array($propertyMetadata)) {
                throw new UnexpectedValueException(sprintf(
                    'Invalid property data for "%1$s", received %2$s',
                    $propertyIdent,
                    (is_object($propertyMetadata) ? get_class($propertyMetadata) : gettype($propertyMetadata))
                ));
            }

            $formProperty = $this->getOrCreateFormProperty($propertyIdent, $propertyMetadata);

            if (!$formProperty->hidden()) {
                yield $propertyIdent => $formProperty;
            }
        }
    }
344131
public function setGroup($group)
    {
        if (isset($this->options['group']) && $this->options['group']) {
            $group = $this->options['group'] . '/' . $group;
        }
        return $this->setOption('group', $group);
    }
347758
function addToGroup($group)
    {
        $this->_api->doRequest("PUT", "{$group->getBaseApiPath()}/contacts/{$this->id}");               
        $this->_group_ids_set[$group->id] = true;        
    }
995349
protected function init($group = 0) {

        $tablecolumns = array('userpic', 'fullname', 'groups');
        $tableheaders = array(
            get_string('userpic'),
            get_string('fullnameuser'),
            get_string('groups')
        );

        $extrafields = get_extra_user_fields($this->get_context());
        $ufields = user_picture::fields('u', $extrafields, $this->useridfield);
        $fields = 'c.id, c.timemodified as completed_timemodified, c.courseid, '.$ufields;
        $from = '{feedback_completed} c '
                . 'JOIN {user} u ON u.id = c.userid AND u.deleted = :notdeleted';
        $where = 'c.anonymous_response = :anon
                AND c.feedback = :instance';
        if ($this->feedbackstructure->get_courseid()) {
            $where .= ' AND c.courseid = :courseid';
        }

        if ($this->is_downloading()) {
            // When downloading data:
            // Remove 'userpic' from downloaded data.
            array_shift($tablecolumns);
            array_shift($tableheaders);

            // Add all identity fields as separate columns.
            foreach ($extrafields as $field) {
                $fields .= ", u.{$field}";
                $tablecolumns[] = $field;
                $tableheaders[] = get_user_field_name($field);
            }
        }

        if ($this->feedbackstructure->get_feedback()->course == SITEID && !$this->feedbackstructure->get_courseid()) {
            $tablecolumns[] = 'courseid';
            $tableheaders[] = get_string('course');
        }

        $tablecolumns[] = 'completed_timemodified';
        $tableheaders[] = get_string('date');

        $this->define_columns($tablecolumns);
        $this->define_headers($tableheaders);

        $this->sortable(true, 'lastname', SORT_ASC);
        $this->collapsible(true);
        $this->set_attribute('id', 'showentrytable');

        $params = array();
        $params['anon'] = FEEDBACK_ANONYMOUS_NO;
        $params['instance'] = $this->feedbackstructure->get_feedback()->id;
        $params['notdeleted'] = 0;
        $params['courseid'] = $this->feedbackstructure->get_courseid();

        $group = (empty($group)) ? groups_get_activity_group($this->feedbackstructure->get_cm(), true) : $group;
        if ($group) {
            $where .= ' AND c.userid IN (SELECT g.userid FROM {groups_members} g WHERE g.groupid = :group)';
            $params['group'] = $group;
        }

        $this->set_sql($fields, $from, $where, $params);
        $this->set_count_sql("SELECT COUNT(c.id) FROM $from WHERE $where", $params);
    }
1351789
public function addSerializerGroup($group)
    {
        if (is_array($group)) {
            $this->serializerGroups = array_merge(
                $this->serializerGroups,
                $group
            );
        } else {
            $this->serializerGroups[$group] = $group;
        }
    }
1374510
public function addImplicitGroupName($group)
    {
        if (\in_array(self::DEFAULT_GROUP, $this->groups) && !\in_array($group, $this->groups)) {
            $this->groups[] = $group;
        }
    }
1363200
public function addGroup($group)
    {
        if (is_string($group)) {
            // If the group is a string, we'll assume the dev is passing
            // in a DN string of the group. We'll try to locate it.
            $group = $this->query->newInstance()->findByDn($group);
        }

        if ($group instanceof Group) {
            // If the group is Group model instance, we can
            // add the current models DN to the group.
            return $group->addMember($this->getDn());
        }

        return false;
    }
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;
    }
795454
public function setGroups(array $groups)
    {
        foreach ($groups as $groupIdent => $groupStruct) {
            if (!is_array($groupStruct)) {
                throw new InvalidArgumentException(sprintf(
                    'The attachment group "%s" must be an array of attachable objects',
                    $groupIdent
                ));
            }

            if (isset($groupStruct['ident'])) {
                $groupIdent = $groupStruct['ident'];
                unset($groupStruct['ident']);
            }

            if (!is_string($groupIdent)) {
                throw new InvalidArgumentException(
                    'The attachment group identifier must be a string'
                );
            }

            if (isset($groupStruct['attachable_objects'])) {
                $groupStruct = $groupStruct['attachable_objects'];
            } elseif (isset($groupStruct['attachables'])) {
                $groupStruct = $groupStruct['attachables'];
            }

            $this->groups[$groupIdent] = $groupStruct;
        }

        return $this;
    }
271873
public function group($group)
    {
        $group = $this->prepareNames(func_get_args(), false);
        $this->group = $group;
        return $this;
    }
754502
public function setGroup(array $group)
    {
        try {

            // need to return << true
            $this->validator->verify($group, [
                'isArray', 'isNotEmpty', 'isExists'
            ], 'group');

        }
        catch(ExceptionFactory $e) {
            echo $e->getMessage();
        }

        return $this;
    }