public function LazyAssetManager::getFormula

Returns an asset's formula.

Parameters

string $name An asset name:

Return value

array The formula

Throws

\InvalidArgumentException If there is no formula by that name

File

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

Class

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

Namespace

Assetic\Factory

Code

public function getFormula($name) {
  if (!$this->loaded) {
    $this
      ->load();
  }
  if (!isset($this->formulae[$name])) {
    throw new \InvalidArgumentException(sprintf('There is no "%s" formula.', $name));
  }
  return $this->formulae[$name];
}