Hides and frees manialink resources

@param Group $group
16587
public function destroy(Group $group)
    {
        $ml = $this->guiHandler->getManialink($group, $this);
        if ($ml) {
            $this->guiHandler->addToHide($ml, $this);
        }
    }
899305
public function assignTo($group): void
    {
        $group = $this->resolveGroup($group);

        $this->groups()->attach($group);
    }
1003572
public function setGroup(Group $group = null): FamilyPermission
    {
        $this->group = $group;
        if ($group && !$group->getFamilyPermissions()->contains($this)) {
            $group->getFamilyPermissions()->add($this);
        }

        return $this;
    }
347758
function addToGroup($group)
    {
        $this->_api->doRequest("PUT", "{$group->getBaseApiPath()}/contacts/{$this->id}");               
        $this->_group_ids_set[$group->id] = true;        
    }
551453
function(group, layer)
	{
	    group.collapsing = true;
	    
	    if (lang.isValue(group.groupContainer))
		layer.removeContainer(group.groupContainer);
	    else
	    {
		for (var i in group.containers)
		    layer.removeContainer(group.containers[i])
		    
		for (var i in group.groups)
		    WireIt.GroupUtils.removeGroupFromLayer(group.groups[i], layer);
	    }
	    group.collapsing = false;
	}
1318943
public function onExpansionGroupDestroy(Group $group, $lastLogin)
    {
        if (isset($this->groups[$group->getName()])) {
            unset($this->groups[$group->getName()]);
        }
    }
1286684
public function insertGroup(Group $group)
    {
        $this->om->persist($group);
        $this->eventDispatcher->dispatch('log', 'Log\LogGroupCreate', [$group]);
        $this->om->flush();

        return $group;
    }
1223603
protected void setGroup(String group) {
    for (INodeHardLinkFile linkedFile : linkedFiles) {
      linkedFile.setGroup(group, false);
    }
  }
423033
public function excludePaymentMethodGroup($group, $name = null)
    {
        $this->getAcceptedPaymentMethod()->addConfig(
            new PagSeguroExcludePaymentMethod($group, $name)
        ); 
    }
399338
protected function createManialink(Group $group)
    {
        $className = $this->className;

        return new $className($this, $group, $this->name, $this->sizeX, $this->sizeY, $this->posX, $this->posY);
    }
1070295
public function addGroup(Group $group)
    {
        $this->hasGroupsProperty();

        if (!$this->groups->contains($group)) {
            $this->groups->add($group);
        }
    }
984437
public void removeGroup(@Nullable L group) {
        if (group == null) {
            return;
        }
        List<L> cards = getGroups();
        boolean changed = cards.remove(group);
        if (changed) {
            setData(cards);
        }
    }
1100502
public function delete($key, $group = self::DEFAULT_GROUP) {
        $this->repository
            ->deleteByKey($key, $group);

        return true;
    }
126993
public function byGroup($group)
    {
        $filtered_messages = $this->filterMessage('group', $group);

        $this->filtered = $filtered_messages;

        return $this;
    }
509334
public function cacheFlushByGroup($group)
    {
        $group = StringHelper::toUnderscoreVariable(get_called_class()) . '/' . StringHelper::toUnderscoreVariable($group);
        $this->getCache()->setGroup($group)->clear();
        
        return $this;
    }
687239
public static function clearGroupsAllCaches($caches = false, $groups = false) {
        $caches = self::_getCachesList($caches);
        foreach ($caches as $cache) {
            if (!$groups)//alls groups
                $cache->clearGroups();
            else {//groups list
                if (is_array($groups)) {
                    foreach ($groups as &$group)
                        $cache->clearGroup($group);
                } elseif (is_string($groups))
                    $cache->clearGroup($groups);
            }
        }
    }
810904
public static function removeResource ($group, $name = FALSE)
	{
		
		// Remove resource from group
		
		if ($name)
		{
			
			unset (self::$resources[$group][$name]);
			
			// Remove default if set to resource
			
			if (self::getGroupSetting ($group, 'default') == $name)
			{
				self::removeDefault ($group);
			}
			
		}
		
		// Else remove group
		
		else
		{
			unset (self::$resources[$group]);
		}
		
		// Remove group settings if nothing left in the group
		
		if (self::countResourceGroup ($group) < 1)
		{
			unset (self::$resourceSettings[$group]);
		}
		
	}