ResponseAssetGroup
class ResponseAssetGroup (View source)
Properties
| static protected ResponseAssetGroup|null | $group | ||
| protected AssetPointer[] | $providedAssetGroupUnmatched | ||
| protected array | $outputAssets | ||
| AssetGroup deprecated | $requiredAssetGroup | ||
| AssetGroup deprecated | $providedAssetGroup | 
Methods
Get an instance of this singleton.
No description
No description
Get a list of assets that need to be outputted.
Notes in the current request that a particular asset has already been provided.
Adds a required asset to this request. This asset will attempt to be output or included when a view is rendered.
Returns all required assets.
Returns only assets that are required but that aren't also in the providedAssetGroup.
Details
        
                static            ResponseAssetGroup
    get()
        
    
    Get an instance of this singleton.
        
                            
    __construct()
        
    
    No description
        
                            
    init()
        
    
    No description
        
                            
    addHeaderAsset(Asset $item)
        
    
    Add an asset that should be loaded in the header.
        
                            
    addFooterAsset(Asset $item)
        
    
    Add an asset that should be loaded in the footer.
        
                            
    addOutputAsset(Asset $asset)
        
    
    Add an asset at the position that's defined in the asset.
        
                    protected        
    addOutputAssetAt(Asset $item, string $position)
        
    
    Add an asset at a specific position.
        
                            
    getAssetsToOutput()
        
    
    Get a list of assets that need to be outputted.
Responsible for a number of things:
- Gets the required assets and adds them to the output assets array (which also contains other assets we have specifically asked for.)
 - Returns the assets with the non-post-process-able assets FIRST, in the order in which they were added, with post-processable assets grouped after. We also make sure to maintain the proper position.
 
        
                            
    markAssetAsIncluded(string $assetType, string|false $assetHandle = false)
        
    
    Notes in the current request that a particular asset has already been provided.
        
                            
    requireAsset(AssetGroup|Asset|string $assetType, string|false $assetHandle = false)
        
    
    Adds a required asset to this request. This asset will attempt to be output or included when a view is rendered.
        
                            AssetGroup
    getRequiredAssets()
        
    
    Returns all required assets.
        
                    protected        bool
    filterProvidedAssets(Asset $asset)
        
    
    No description
        
                            Asset[]
    getRequiredAssetsToOutput()
        
    
    Returns only assets that are required but that aren't also in the providedAssetGroup.