diff --git a/docs/guide/structure-assets.md b/docs/guide/structure-assets.md index 29e1f2d..a9b36b5 100644 --- a/docs/guide/structure-assets.md +++ b/docs/guide/structure-assets.md @@ -21,9 +21,9 @@ JavaScript files in the bundle in the rendered Web page. ## Defining Asset Bundles <a name="defining-asset-bundles"></a> Asset bundles are specified as PHP classes extending from [[yii\web\AssetBundle]]. The name of a bundle is simply -its corresponding PHP class name which should be [autoloadable](concept-autoloading.md). In an asset bundle class, -you would typically specify where the assets are located, what CSS and JavaScript files the bundle contains, and -how the bundle depends on other bundles. +its corresponding fully qualified PHP class name (without the leading backslash). An asset bundle class should +be [autoloadable](concept-autoloading.md). It usually specifies where the assets are located, what CSS and +JavaScript files the bundle contains, and how the bundle depends on other bundles. The following code defines the main asset bundle used by [the basic application template](start-installation.md): diff --git a/framework/web/AssetManager.php b/framework/web/AssetManager.php index 278d37c..43e120c 100644 --- a/framework/web/AssetManager.php +++ b/framework/web/AssetManager.php @@ -178,7 +178,7 @@ class AssetManager extends Component * This method will first look for the bundle in [[bundles]]. If not found, * it will treat `$name` as the class of the asset bundle and create a new instance of it. * - * @param string $name the class name of the asset bundle + * @param string $name the class name of the asset bundle (without the leading backslash) * @param boolean $publish whether to publish the asset files in the asset bundle before it is returned. * If you set this false, you must manually call `AssetBundle::publish()` to publish the asset files. * @return AssetBundle the asset bundle instance diff --git a/framework/web/View.php b/framework/web/View.php index 95acf42..b8647da 100644 --- a/framework/web/View.php +++ b/framework/web/View.php @@ -269,7 +269,7 @@ class View extends \yii\base\View /** * Registers the named asset bundle. * All dependent asset bundles will be registered. - * @param string $name the name of the asset bundle. + * @param string $name the class name of the asset bundle (without the leading backslash) * @param integer|null $position if set, this forces a minimum position for javascript files. * This will adjust depending assets javascript file position or fail if requirement can not be met. * If this is null, asset bundles position settings will not be changed.