web\AssetManager getBundle()

getBundle() public method

Returns the named asset bundle.

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.

public yii\web\AssetBundle getBundle ( $name, $publish = true )
$name string

The class name of the asset bundle (without the leading backslash)

$publish boolean

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 yii\web\AssetBundle

The asset bundle instance

throws yii\base\InvalidConfigException

if $name does not refer to a valid asset bundle

doc_Yii
2016-10-30 17:14:36
Comments
Leave a Comment

Please login to continue.