web\AssetManager publishDirectory()

publishDirectory() protected method

Publishes a directory.

protected array publishDirectory ( $src, $options )
$src string

The asset directory to be published

$options array

The options to be applied when publishing a directory. The following options are supported:

  • only: array, list of patterns that the file paths should match if they want to be copied.
  • except: array, list of patterns that the files or directories should match if they want to be excluded from being copied.
  • caseSensitive: boolean, whether patterns specified at "only" or "except" should be case sensitive. Defaults to true.
  • beforeCopy: callback, a PHP callback that is called before copying each sub-directory or file. This overrides $beforeCopy if set.
  • afterCopy: callback, a PHP callback that is called after a sub-directory or file is successfully copied. This overrides $afterCopy if set.
  • forceCopy: boolean, whether the directory being published should be copied even if it is found in the target directory. This option is used only when publishing a directory. This overrides $forceCopy if set.
return array

The path directory and the URL that the asset is published as.

throws yii\base\InvalidParamException

if the asset to be published does not exist.

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

Please login to continue.