• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/ui/webpack/internals/filechecker.php
  • Класс: Bitrix\Crm\UI\Webpack\Internals\FileChecker
  • Вызов: FileChecker::addItem
public function addItem(string $type, int $id): bool
{
	if (!$this->isEnabled())
	{
		return false;
	}

	if (!$this->createPack($type, $id))
	{
		return false;
	}

	$items = $this->getItems();
	$item = [$type, $id];
	if (in_array($item, $items, true))
	{
		return false;
	}

	$items[] = $item;
	if (!$this->saveItems($items))
	{
		return false;
	}

	$this->addAgent();
	return true;
}