Skip to content

Instantly share code, notes, and snippets.

@cornernote
Last active January 3, 2016 23:29
Show Gist options
  • Select an option

  • Save cornernote/8535811 to your computer and use it in GitHub Desktop.

Select an option

Save cornernote/8535811 to your computer and use it in GitHub Desktop.
/**
* AssetManager
*
* @author Brett O'Donnell <cornernote@gmail.com>
* @copyright 2013 Mr PHP
* @license BSD-3-Clause
*/
class AssetManager extends CAssetManager
{
/**
* Publishes a file or a directory.
*
* Will use linkAssets even if $forceCopy is true
*
* @param string $path
* @param bool $hashByName
* @param int $level
* @param null $forceCopy
*/
public function publish($path, $hashByName = false, $level = -1, $forceCopy = null)
{
if ($forceCopy && $this->linkAssets)
$forceCopy = null;
return parent::publish($path, $hashByName, $level, $forceCopy);
}
}
return array(
'components' => array(
'assetManager' => array(
'class' => 'AssetManager',
'linkAssets' => true,
),
),
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment