AsseticBundle\View\Helper\Asset::__invoke PHP Method

__invoke() public method

public __invoke ( string $collectionName, array $options = [] ) : string
$collectionName string
$options array
return string
    public function __invoke($collectionName, array $options = [])
    {
        if (!$this->service->getAssetManager()->has($collectionName)) {
            throw new Exception\InvalidArgumentException('Collection "' . $collectionName . '" does not exist.');
        }
        $asset = $this->service->getAssetManager()->get($collectionName);
        return $this->setupAsset($asset, $options);
    }