|
|
|
@ -42,10 +42,18 @@ class AssetBundle extends Object
|
|
|
|
|
public $css = array(); |
|
|
|
|
public $depends = array(); |
|
|
|
|
|
|
|
|
|
public function mapTo($target) |
|
|
|
|
{ |
|
|
|
|
$this->depends = array($target); |
|
|
|
|
$this->js = $this->css = array(); |
|
|
|
|
$this->basePath = null; |
|
|
|
|
$this->baseUrl = null; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @param \yii\base\ViewContent $content |
|
|
|
|
*/ |
|
|
|
|
public function registerWith($content) |
|
|
|
|
public function registerAssets($content) |
|
|
|
|
{ |
|
|
|
|
foreach ($this->depends as $name) { |
|
|
|
|
$content->registerAssetBundle($name); |
|
|
|
@ -65,4 +73,14 @@ class AssetBundle extends Object
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* @param \yii\web\AssetManager $assetManager |
|
|
|
|
*/ |
|
|
|
|
public function publish($assetManager) |
|
|
|
|
{ |
|
|
|
|
if ($this->basePath !== null && $this->baseUrl === null) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |