mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-30 06:29:02 +08:00
Added doc.
This commit is contained in:
@@ -85,6 +85,11 @@ class AssetBundle extends Object
|
||||
* @var array list of the bundle names that this bundle depends on
|
||||
*/
|
||||
public $depends = array();
|
||||
/**
|
||||
* @var array the options to be passed to [[AssetManager::publish()]] when the asset bundle
|
||||
* is being published.
|
||||
*/
|
||||
public $publishOption = array();
|
||||
|
||||
/**
|
||||
* Initializes the bundle.
|
||||
@@ -114,7 +119,7 @@ class AssetBundle extends Object
|
||||
}
|
||||
|
||||
if ($this->sourcePath !== null) {
|
||||
list ($this->basePath, $this->baseUrl) = $am->publish($this->sourcePath);
|
||||
list ($this->basePath, $this->baseUrl) = $am->publish($this->sourcePath, $this->publishOption);
|
||||
}
|
||||
|
||||
foreach ($this->js as $js => $options) {
|
||||
|
||||
@@ -164,6 +164,10 @@ class AssetManager extends Component
|
||||
* Note, in case $forceCopy is false the method only checks the existence of the target
|
||||
* directory to avoid repetitive copying (which is very expensive).
|
||||
*
|
||||
* By default, when publishing a directory, subdirectories and files whose name starts with a dot "."
|
||||
* will NOT be published. If you want to change this behavior, you may specify the "beforeCopy" option
|
||||
* as explained in the `$options` parameter.
|
||||
*
|
||||
* Note: On rare scenario, a race condition can develop that will lead to a
|
||||
* one-time-manifestation of a non-critical problem in the creation of the directory
|
||||
* that holds the published assets. This problem can be avoided altogether by 'requesting'
|
||||
|
||||
Reference in New Issue
Block a user