Runtime
class Runtime
| internal |
Runtime helpers for Latte.
Methods
Asset|null
resolve(Asset|null $asset, array $options, bool $try)
Resolves an asset reference, passing it through as-is if already an Asset.
string
renderAsset(Asset $asset)
Renders the asset as an HTML import element, including all EntryAsset dependencies.
string
string
renderAttributes(Asset $asset, string $tagName, array $usedAttributes)
Renders HTML attributes from the asset's import element, omitting attributes already set on the tag.
Details
at line 26
__construct(Registry $registry, string|false|null $nonce = null)
No description
at line 40
Asset|null
resolve(Asset|null $asset, array $options, bool $try)
Resolves an asset reference, passing it through as-is if already an Asset.
at line 54
string
renderAsset(Asset $asset)
Renders the asset as an HTML import element, including all EntryAsset dependencies.
at line 78
string
renderAssetPreload(Asset $asset)
Renders the asset as an HTML preload hint element.
at line 93
string
renderAttributes(Asset $asset, string $tagName, array $usedAttributes)
Renders HTML attributes from the asset's import element, omitting attributes already set on the tag.
Adapts to and elements when the asset's native element doesn't match.