public function LazyAssetManager::addResource

Adds a resource to the asset manager.

Parameters

ResourceInterface $resource A resource:

string $loader The loader alias for this resource:

File

drupal/core/vendor/kriswallsmith/assetic/src/Assetic/Factory/LazyAssetManager.php, line 72

Class

LazyAssetManager
A lazy asset manager is a composition of a factory and many formula loaders.

Namespace

Assetic\Factory

Code

public function addResource(ResourceInterface $resource, $loader) {
  $this->resources[$loader][] = $resource;
  $this->loaded = false;
}