# TimePickerAsset

> Publishes the bundled Timepicker and optionally registers installed Yii Bootstrap assets.

[API reference](/docs/api/index.md) › [TimePicker](/docs/extensions/time-picker/reference/index.md) › TimePickerAsset

| class | `yii2\extensions\timepicker\TimePickerAsset` |
| --- | --- |
| Extends | [`yii\web\AssetBundle`](/docs/api/yii/web/assetbundle/index.md) » [`yii\base\BaseObject`](/docs/api/yii/base/baseobject/index.md) |
| Implements | [`yii\base\Configurable`](/docs/api/yii/base/configurable/index.md) |
| Source | [`src/TimePickerAsset.php`](https://github.com/yii2-extensions/time-picker/blob/main/src/TimePickerAsset.php#L15) |

Publishes the bundled Timepicker and optionally registers installed Yii Bootstrap assets.

## Properties

| Property | Type | Description | Defined by |
| --- | --- | --- | --- |
| <span id="property-basePath"></span>[`$basePath`](/docs/api/yii/web/assetbundle/index.md#property-basePath) | `string\|null` | The Web-accessible directory that contains the asset files in this bundle. Default: `null`. | [`yii\web\AssetBundle`](/docs/api/yii/web/assetbundle/index.md) |
| <span id="property-baseUrl"></span>[`$baseUrl`](/docs/api/yii/web/assetbundle/index.md#property-baseUrl) | `string\|null` | The base URL for the relative asset files listed in [`$js`](/docs/api/yii/web/assetbundle/index.md#property-js) and [`$css`](/docs/api/yii/web/assetbundle/index.md#property-css). Default: `null`. | [`yii\web\AssetBundle`](/docs/api/yii/web/assetbundle/index.md) |
| <span id="property-bsDependencyEnabled"></span>`$bsDependencyEnabled` | `bool\|null` | Whether to register an installed Yii Bootstrap adapter. Default: `null`. | `TimePickerAsset` |
| <span id="property-bsPluginEnabled"></span>`$bsPluginEnabled` | `bool` | Whether to register its JavaScript bundle as well as CSS. Default: `false`. | `TimePickerAsset` |
| <span id="property-css"></span>`$css` |  | CSS files for the asset bundle. Default: `self::CSS`. | `TimePickerAsset` |
| <span id="property-cssOptions"></span>[`$cssOptions`](/docs/api/yii/web/assetbundle/index.md#property-cssOptions) | `yii\web\RegisterCssFileOptions` | The options that will be passed to [`View::registerCssFile()`](/docs/api/yii/web/view/index.md#method-registerCssFile) when registering the CSS files in this bundle. Default: `[]`. | [`yii\web\AssetBundle`](/docs/api/yii/web/assetbundle/index.md) |
| <span id="property-debug"></span>`$debug` | `bool\|null` | Overrides Yii debug mode when choosing the bundled asset files. Default: `null`. | `TimePickerAsset` |
| <span id="property-depends"></span>`$depends` |  | Asset bundles that this bundle depends on. Default: `[\yii\web\YiiAsset::class]`. | `TimePickerAsset` |
| <span id="property-js"></span>`$js` |  | JavaScript files for the asset bundle. Default: `self::JS`. | `TimePickerAsset` |
| <span id="property-jsOptions"></span>[`$jsOptions`](/docs/api/yii/web/assetbundle/index.md#property-jsOptions) | `yii\web\RegisterJsFileOptions` | The options that will be passed to [`View::registerJsFile()`](/docs/api/yii/web/view/index.md#method-registerJsFile) when registering the JS files in this bundle. Default: `[]`. | [`yii\web\AssetBundle`](/docs/api/yii/web/assetbundle/index.md) |
| <span id="property-publishOptions"></span>[`$publishOptions`](/docs/api/yii/web/assetbundle/index.md#property-publishOptions) | `yii\web\PublishOptions` | The options to be passed to [`AssetManager::publish()`](/docs/api/yii/web/assetmanager/index.md#method-publish) when the asset bundle is being published. Default: `[]`. | [`yii\web\AssetBundle`](/docs/api/yii/web/assetbundle/index.md) |
| <span id="property-sourcePath"></span>`$sourcePath` |  | Source path for the asset bundle. Default: `__DIR__ . '/assets'`. | `TimePickerAsset` |

## Methods

| Method | Description | Defined by |
| --- | --- | --- |
| [`__construct()`](#method-__construct) | Normalizes the legacy empty asset sentinels before Yii configures its file lists. | `TimePickerAsset` |
| <span id="method-__call"></span>[`__call()`](/docs/api/yii/base/baseobject/index.md#method-__call) | Calls the named method which is not a class method. | [`yii\base\BaseObject`](/docs/api/yii/base/baseobject/index.md) |
| <span id="method-__get"></span>[`__get()`](/docs/api/yii/base/baseobject/index.md#method-__get) | Returns the value of an object property. | [`yii\base\BaseObject`](/docs/api/yii/base/baseobject/index.md) |
| <span id="method-__isset"></span>[`__isset()`](/docs/api/yii/base/baseobject/index.md#method-__isset) | Checks if a property is set, i.e. defined and not null. | [`yii\base\BaseObject`](/docs/api/yii/base/baseobject/index.md) |
| <span id="method-__set"></span>[`__set()`](/docs/api/yii/base/baseobject/index.md#method-__set) | Sets value of an object property. | [`yii\base\BaseObject`](/docs/api/yii/base/baseobject/index.md) |
| <span id="method-__unset"></span>[`__unset()`](/docs/api/yii/base/baseobject/index.md#method-__unset) | Sets an object property to null. | [`yii\base\BaseObject`](/docs/api/yii/base/baseobject/index.md) |
| <span id="method-canGetProperty"></span>[`canGetProperty()`](/docs/api/yii/base/baseobject/index.md#method-canGetProperty) | Returns a value indicating whether a property can be read. | [`yii\base\BaseObject`](/docs/api/yii/base/baseobject/index.md) |
| <span id="method-canSetProperty"></span>[`canSetProperty()`](/docs/api/yii/base/baseobject/index.md#method-canSetProperty) | Returns a value indicating whether a property can be set. | [`yii\base\BaseObject`](/docs/api/yii/base/baseobject/index.md) |
| <span id="method-className"></span>[`className()`](/docs/api/yii/base/baseobject/index.md#method-className) static | Returns the fully qualified name of this class. | [`yii\base\BaseObject`](/docs/api/yii/base/baseobject/index.md) |
| <span id="method-hasMethod"></span>[`hasMethod()`](/docs/api/yii/base/baseobject/index.md#method-hasMethod) | Returns a value indicating whether a method is defined. | [`yii\base\BaseObject`](/docs/api/yii/base/baseobject/index.md) |
| <span id="method-hasProperty"></span>[`hasProperty()`](/docs/api/yii/base/baseobject/index.md#method-hasProperty) | Returns a value indicating whether a property is defined. | [`yii\base\BaseObject`](/docs/api/yii/base/baseobject/index.md) |
| [`init()`](#method-init) | Selects minified assets outside debug mode and normalizes the legacy empty path. | `TimePickerAsset` |
| <span id="method-publish"></span>[`publish()`](/docs/api/yii/web/assetbundle/index.md#method-publish) | Publishes the asset bundle if its source code is not under Web-accessible directory. | [`yii\web\AssetBundle`](/docs/api/yii/web/assetbundle/index.md) |
| <span id="method-register"></span>[`register()`](/docs/api/yii/web/assetbundle/index.md#method-register) static | Registers this asset bundle with a view. | [`yii\web\AssetBundle`](/docs/api/yii/web/assetbundle/index.md) |
| <span id="method-registerAssetFiles"></span>[`registerAssetFiles()`](/docs/api/yii/web/assetbundle/index.md#method-registerAssetFiles) | Registers the CSS and JS files with the given view. | [`yii\web\AssetBundle`](/docs/api/yii/web/assetbundle/index.md) |
| [`registerBootstrap()`](#method-registerBootstrap) | Registers the optional installed Bootstrap adapter for the widget's effective version. | `TimePickerAsset` |

## Constants

| Constant | Value | Description | Defined by |
| --- | --- | --- | --- |
| <span id="const-EMPTY_ASSET"></span>`EMPTY_ASSET` | `'N0/@$$3T$'` | Retained for existing asset manager overrides that disable a file list. | `TimePickerAsset` |
| <span id="const-EMPTY_PATH"></span>`EMPTY_PATH` | `'N0/P@T#'` | Retained for existing asset manager overrides that disable publication. | `TimePickerAsset` |

## Method details

### __construct() <span id="method-__construct"></span>

```php
public function __construct(array<string, mixed> $config = [])
```

Normalizes the legacy empty asset sentinels before Yii configures its file lists.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$config` | `array<string, mixed>` |  |

### init() <span id="method-init"></span>

```php
public function init(): void
```

Selects minified assets outside debug mode and normalizes the legacy empty path.

### registerBootstrap() <span id="method-registerBootstrap"></span>

```php
public function registerBootstrap(yii\web\View $view, 3|4|5 $version): void
```

Registers the optional installed Bootstrap adapter for the widget's effective version.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$view` | [`yii\web\View`](/docs/api/yii/web/view/index.md) |  |
| `$version` | `3\|4\|5` |  |