A

AssetClass in namespace Nette\Assets

Represents a web asset (image, script, stylesheet, font, etc.).

AssetNotFoundExceptionClass in namespace Nette\Assets

Asset cannot be found by a mapper.

AudioAssetClass in namespace Nette\Assets

Audio asset.

FilesystemMapper::applyVersion() — Method in class FilesystemMapper

Appends a ?v={filemtime} version parameter to the URL.

Registry::addMapper() — Method in class Registry

Registers an asset mapper under the given identifier.

AssetNodeClass in namespace Nette\Bridges\AssetsLatte\Nodes

{asset reference [, attributes]} {preload reference [, attributes]} Renders HTML element for asset with automatic versioning.

$ AssetNode#attributesProperty in class AssetNode
$ NAssetNode#attributesProperty in class NAssetNode

B

DIExtension::beforeCompile() — Method in class DIExtension

C

Helpers::createAssetFromUrl() — Method in class Helpers

Creates an Asset of the appropriate type for the given URL.

Helpers::checkOptions() — Method in class Helpers

Validates an array of options against allowed optional and required keys.

AssetNode::create() — Method in class AssetNode
$ NAssetNode#contentProperty in class NAssetNode
NAssetNode::create() — Method in class NAssetNode

D

$ AudioAsset#durationProperty in class AudioAsset

Duration in seconds

Helpers::detectDevServer() — Method in class Helpers

Reads the Vite dev server URL from the given info file, or returns null if unavailable.

DIExtensionClass in namespace Nette\Bridges\AssetsDI

Nette DI extension that registers asset mappers and the asset Registry as container services.

E

EntryAssetClass in namespace Nette\Assets

Vite entry point asset that carries its CSS imports and JS preloads as dependencies.

F

$ Asset#fileProperty in class Asset

The local file path if available

FilesystemMapperClass in namespace Nette\Assets

Maps asset references to files within a specified local directory.

FontAssetClass in namespace Nette\Assets

Web font file.

NAssetNode::findUsedAttributes() — Method in class NAssetNode

Collects attributes explicitly set on the HTML element, mapping name to value or true.

G

AudioAsset::getImportElement() — Method in class AudioAsset

Returns the HTML element used to import the asset (img, script, link rel="stylesheet", etc.).

AudioAsset::getPreloadElement() — Method in class AudioAsset

Returns the HTML element used to preload the asset (link rel="preload" or rel="modulepreload").

FilesystemMapper::getAsset() — Method in class FilesystemMapper

Returns the asset for the given relative reference.

FilesystemMapper::getBaseUrl() — Method in class FilesystemMapper
FilesystemMapper::getBasePath() — Method in class FilesystemMapper
FontAsset::getImportElement() — Method in class FontAsset

Returns the HTML element used to import the asset (img, script, link rel="stylesheet", etc.).

FontAsset::getPreloadElement() — Method in class FontAsset

Returns the HTML element used to preload the asset (link rel="preload" or rel="modulepreload").

GenericAssetClass in namespace Nette\Assets

Asset for file types without a dedicated asset class.

Helpers::guessMimeTypeFromExtension() — Method in class Helpers

Guesses the MIME type from the file extension in the given URL or path, or null if unknown.

Helpers::guessMP3Duration() — Method in class Helpers

Estimates the duration (in seconds) of an MP3 file, assuming constant bitrate (CBR).

HtmlRenderable::getImportElement() — Method in class HtmlRenderable

Returns the HTML element used to import the asset (img, script, link rel="stylesheet", etc.).

HtmlRenderable::getPreloadElement() — Method in class HtmlRenderable

Returns the HTML element used to preload the asset (link rel="preload" or rel="modulepreload").

ImageAsset::getImportElement() — Method in class ImageAsset

Returns the HTML element used to import the asset (img, script, link rel="stylesheet", etc.).

ImageAsset::getPreloadElement() — Method in class ImageAsset

Returns the HTML element used to preload the asset (link rel="preload" or rel="modulepreload").

Mapper::getAsset() — Method in class Mapper

Returns an Asset for the given reference.

Registry::getMapper() — Method in class Registry

Returns the mapper registered under the given identifier.

Registry::getAsset() — Method in class Registry

Returns an Asset for the given qualified reference ('mapper:reference' or ['mapper', 'reference']).

ScriptAsset::getImportElement() — Method in class ScriptAsset

Returns the HTML element used to import the asset (img, script, link rel="stylesheet", etc.).

ScriptAsset::getPreloadElement() — Method in class ScriptAsset

Returns the HTML element used to preload the asset (link rel="preload" or rel="modulepreload").

StyleAsset::getImportElement() — Method in class StyleAsset

Returns the HTML element used to import the asset (img, script, link rel="stylesheet", etc.).

StyleAsset::getPreloadElement() — Method in class StyleAsset

Returns the HTML element used to preload the asset (link rel="preload" or rel="modulepreload").

VideoAsset::getImportElement() — Method in class VideoAsset

Returns the HTML element used to import the asset (img, script, link rel="stylesheet", etc.).

VideoAsset::getPreloadElement() — Method in class VideoAsset

Returns the HTML element used to preload the asset (link rel="preload" or rel="modulepreload").

ViteMapper::getAsset() — Method in class ViteMapper

Returns an Asset for the given Vite entry point or public directory file.

ViteMapper::getBaseUrl() — Method in class ViteMapper
ViteMapper::getBasePath() — Method in class ViteMapper
DIExtension::getConfigSchema() — Method in class DIExtension
LatteExtension::getTags() — Method in class LatteExtension
LatteExtension::getFunctions() — Method in class LatteExtension
LatteExtension::getProviders() — Method in class LatteExtension
AssetNode::getIterator() — Method in class AssetNode
NAssetNode::getIterator() — Method in class NAssetNode

H

HelpersClass in namespace Nette\Assets

Asset utility functions.

HtmlRenderableClass in namespace Nette\Assets

Asset renderable as an HTML element.

$ ImageAsset#heightProperty in class ImageAsset

I

ImageAssetClass in namespace Nette\Assets

Image asset.

L

LazyLoadClass in namespace Nette\Assets

Lazy-loading of properties as a workaround for PHP < 8.4.

DIExtension::loadConfiguration() — Method in class DIExtension
LatteExtensionClass in namespace Nette\Bridges\AssetsLatte

Latte extension that provides asset-related functions and tags:

  • asset(): returns asset URL or throws AssetNotFoundException if asset not found
  • tryAsset(): returns asset URL or null if asset not found
  • {asset ...} renders HTML code
  • {preload ...} renders HTML code for preloading
  • n:asset renders HTML attributes

M

$ AudioAsset#mimeTypeProperty in class AudioAsset
$ FontAsset#mimeTypeProperty in class FontAsset
$ GenericAsset#mimeTypeProperty in class GenericAsset
$ ImageAsset#mimeTypeProperty in class ImageAsset
MapperClass in namespace Nette\Assets

Resolves asset references to Asset objects for a specific storage backend.

N

$ AssetNode#nameProperty in class AssetNode
NAssetNodeClass in namespace Nette\Bridges\AssetsLatte\Nodes