# WHMCS\View\Template\AssetUtil

`Class`

AssetUtil

## Methods

### __construct

```php
public function __construct(TemplateSetInterface $template)
```

### resetCache

```php
public static function resetCache()
```

### factoryThemeUtil

```php
public static function factoryThemeUtil(): self
```

### factoryOrderformUtil

```php
public static function factoryOrderformUtil(): self
```

### assetPaths

```php
public function assetPaths()
```

### assetUrl

```php
public function assetUrl(string $basename, ?string $namespace = null): string
```

Retrieve best URL path of asset

Value will be based on the template's configuration, the existence
of the named asset on disk, any configured parent. If it doesn't exist
at the explicitly name place or within the parent, a default concoction
will be provided based on the name space (or the parent's named space
if a parent is defined).  Do as I mean.

**Parameters**

| Type | Name | Description |
|  --- | --- | --- |
| `string` | `$basename` |  |
| `string|null` | `$namespace` |  |


**Returns** `string`

### assetExists

```php
public function assetExists(string $basename, ?string $namespace = null)
```

**Parameters**

| Type | Name | Description |
|  --- | --- | --- |
| `string` | `$basename` |  |
| `string|null` | `$namespace` |  |


**Returns** `bool\|string` — Path or FALSE