Apply collected DQL conditions on the query builder and reset them

@param array $group
961197
private function applyCollectedDqlConditions(array $group): void
    {
        if (!$this->dqlConditions) {
            return;
        }

        if ($group['conditionsLogic'] === 'AND') {
            $fieldsDql = $this->queryBuilder->expr()->andX(...$this->dqlConditions);
        } else {
            $fieldsDql = $this->queryBuilder->expr()->orX(...$this->dqlConditions);
        }

        if ($group['groupLogic'] === 'AND') {
            $this->queryBuilder->andWhere($fieldsDql);
        } else {
            $this->queryBuilder->orWhere($fieldsDql);
        }

        $this->dqlConditions = [];
    }
1350243
function ResetQuery($query = null) {
		$this->db->ar_select = array();
		$this->db->ar_distinct = FALSE;
		$this->db->ar_from = array();
		$this->db->ar_join = array();
		$this->db->ar_where = array();
		$this->db->ar_like = array();
		$this->db->ar_groupby = array();
		$this->db->ar_having = array();
		$this->db->ar_keys = array();
		$this->db->ar_limit = FALSE;
		$this->db->ar_offset = FALSE;
		$this->db->ar_order = FALSE;
		$this->db->ar_orderby = array();
		$this->db->ar_set = array();
		$this->db->ar_wherein = array();
		$this->db->ar_aliased_tables = array();
		$this->db->ar_store_array = array();

		$this->joystError = '';
		$this->continue = TRUE;
		$this->query = $query;
	}
809824
public function setGroups(array $groups) {
		foreach ($groups as $title => $path) {
			$this->setGroup($title, $path);
		}
	}
416375
public function setActualFields($group = UNDEFINED)
    {
        if (is_array($group)) {
            $this->actual_fields = $group;

            return $this;
        }
        if ($group === UNDEFINED) {
            $group = 'all';
        }
        $this->actual_fields = $this->getGroupField($group);

        return $this;
    }
467046
public function removeGroup($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
            // remove the current models DN from the group.
            return $group->removeMember($this->getDn());
        }

        return false;
    }
916099
protected function loadGroupConfig($group)
    {
        // data from files
        $res = $this->loader->load($group);

        // mark pool dirty
        if (count($res)) {
            $this->setPoolDirty();
        }

        $config = [];
        foreach($res as $grp => $grpData) {
            if (!isset($config[$grp])) {
                $config[$grp] = [];
            }
            foreach ($grpData as $data) {
                $config[$grp] = array_replace_recursive(
                    $config[$grp], $this->fixValue($data)
                );
            }
        }

        // set the whole pool
        if (null === $group) {
            $this->pool = $config;

        // set a group
        } else {
            $this->pool[$group] = $config[$group];
        }
    }
126993
public function byGroup($group)
    {
        $filtered_messages = $this->filterMessage('group', $group);

        $this->filtered = $filtered_messages;

        return $this;
    }
682033
public function findByGroup(Group $group)
    {
        $query = $this->createQueryBuilder('a')
                      ->innerjoin('a.groups', 'g')
                      ->where('g.id = :group')
                      ->setParameter('group', $group->getId());
        return $query->getQuery()->getResult();
     }
344131
public function setGroup($group)
    {
        if (isset($this->options['group']) && $this->options['group']) {
            $group = $this->options['group'] . '/' . $group;
        }
        return $this->setOption('group', $group);
    }
186082
public function deleteGroup(Group $group)
    {
        $this->eventDispatcher->dispatch(
            'claroline_groups_delete',
            'GenericData',
            [[$group]]
        );

        $this->om->remove($group);
        $this->om->flush();
    }
1010114
public function useUserAccessGroups(array $groups): QueryBuilder
    {
        $groups = array_map('intval', $groups);
        $groups[] = 0; // always grant access to public documents
        $groups = array_unique($groups);
        sort($groups, SORT_NUMERIC);

        $accessFilter = '{!typo3access}' . implode(',', $groups);
        $this->queryToBuild->removeFilterQuery('access');
        return $this->useFilter($accessFilter, 'access');
    }
492357
protected function executeActions($group)
    {
        $executedCount = 0;
        reset($this->actions[$group]);
        while (list($index, $action) = each($this->actions[$group])) {
            if ($this->isActionReadyToExecute($action[0], $action[2])) {
                $executedCount += $this->executeAction($index, $action);
                unset($this->actions[$group][$index]);
            }
        }

        return $executedCount;
    }
766855
public function clean($group = null)
	{
		$prefix = $this->options['hash'] . '-cache-' . $group . '-';

		foreach ($this->data as $key => $value)
		{
			if (substr($key, 0, strlen($prefix)) == $prefix)
			{
				unset($this->data[$key]);
			}
		}

		return true;
	}
1334682
public function setGroup($group)
    {
        $fs = FileSystem::getFileSystem();

        $fs->chgrp($this->getPath(), $group);
    }
135519
public function insertGroup(Group $group)
    {
        $group->setGuid($this->container->get('claroline.utilities.misc')->generateGuid());
        $this->om->persist($group);
        $this->eventDispatcher->dispatch('log', 'Log\LogGroupCreate', array($group));
        $this->om->flush();
    }
1331066
public function commitAsync( string $group = "default" )
	{
		$list = [];
		$requests = @$this->async_requests[$group] ?: [];

		/** @var AsyncRequest $request */
		foreach ($requests as $request)
			$list[] = $request->getPromise();

		unset($this->async_requests[$group]);
		settle($list)->wait();
	}
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()
        );
    }