• Модуль: translate
  • Путь к файлу: ~/bitrix/modules/translate/lib/controller/index/collectfileindex.php
  • Класс: BitrixTranslateControllerIndexCollectFileIndex
  • Вызов: CollectFileIndex::runIndexing
private function runIndexing(array $params): array
{
	$path = rtrim($params['path'], '/');

	$seek = new TranslateFilter();
	if (!empty($this->seekPathId))
	{
		$seek->pathId = $this->seekPathId;
	}

	$filter = new TranslateFilter(['path' => $path]);
	if (!empty($this->languages))
	{
		$filter->langId = $this->languages;
	}

	$indexer = new IndexFileIndexCollection();

	$processedItemCount = $indexer->collect($filter, $this->instanceTimer(), $seek);

	$this->processedItems += $processedItemCount;

	if ($this->processedItems >= $this->totalItems)
	{
		$this->declareAccomplishment();
		$this->clearProgressParameters();
	}
	else
	{
		$this->seekPathId = $seek->nextPathId;
	}

	return [
		'PROCESSED_ITEMS' => $this->processedItems,
		'TOTAL_ITEMS' => $this->totalItems,
	];
}