• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/web/webpacker/resource/asset.php
  • Класс: BitrixMainWebWebPackerResourceAsset
  • Вызов: Asset::create
static function create($path)
{
	$type = self::detectType($path);
	switch ($type)
	{
		case self::LANG:
			return new LangAsset($path);
		case self::JS:
			return new JsAsset($path);
		case self::CSS:
			return new CssAsset($path);
		case self::LAYOUT:
			return new LayoutAsset($path);
		default:
			throw new ArgumentException("Unknown type `$type`.");
	}
}