• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/web/webpacker/resource/asset.php
  • Класс: BitrixMainWebWebPackerResourceAsset
  • Вызов: Asset::setPath
public function setPath($path)
{
	if (!static::isExists($path))
	{
		throw new ArgumentException("Can not locate file by path `{$path}`.");
	}

	if (self::detectType($path) != $this->getType())
	{
		throw new ArgumentException("Path has wrong ext of `$path` for Asset with type `{$this->getType()}`.");
	}

	$this->path = $path;

	return $this;
}