• Модуль: seo
  • Путь к файлу: ~/bitrix/modules/seo/lib/retargeting/internals/queue.php
  • Класс: BitrixSeoRetargetingInternalsQueueTable
  • Вызов: QueueTable::divideListIntoPortions
static function divideListIntoPortions($list)
{
	$portions = array();

	$deleteCount = count($list);
	$portionCount = ceil($deleteCount / self::PORTION_QUANTITY);
	$deleteNum = 0;
	for ($portionNum = 0; $portionNum < $portionCount; $portionNum++)
	{
		$deleteList = array();
		$deletePortionCount = ($portionNum + 1) * self::PORTION_QUANTITY;
		for (; $deleteNum < $deletePortionCount; $deleteNum++)
		{
			if ($deleteNum >= $deleteCount)
			{
				break;
			}
			$deleteList[] = (int) $list[$deleteNum];
		}

		$portions[] = $deleteList;
	}

	return $portions;
}