behaviors/TbWidget.php
public function publishAssets($path, $forceCopy = false)
    {
        if (!Yii::app()->hasComponent('assetManager')) {
            throw new CException('Failed to locate the asset manager component.');
        }
        /* @var CAssetManager $assetManager */
        $assetManager = Yii::app()->getComponent('assetManager');
        $assetsUrl = $assetManager->publish($path, false, -1, $forceCopy);
        return $this->_assetsUrl = $assetsUrl;
    }
public function publishAssets($path, $forceCopy = false)
    {
        if (!Yii::app()->hasComponent('assetManager')) {
            throw new CException('Failed to locate the asset manager component.');
        }
        /* @var CAssetManager $assetManager */
        $assetManager = Yii::app()->getComponent('assetManager');
        $assetsUrl = $assetManager->publish($path, false, -1, $forceCopy);
        return $this->_assetsUrl = $assetsUrl;
    }
public function publishAssets ( $ path , $ forceCopy = false ) { if ( ! Yii :: app ( ) -> hasComponent ( 'assetManager' ) ) { throw new CException ( 'Failed to locate the asset manager component.' ) ; } /* @var CAssetManager $assetManager */ $ assetManager = Yii :: app ( ) -> getComponent ( 'assetManager' ) ; $ assetsUrl = $ assetManager -> publish ( $ path , false , - 1 , $ forceCopy ) ; return $ this -> _assetsUrl = $ assetsUrl ; }
Publishes an asset path.
@param string $path the assets path.
@param boolean $forceCopy whether we should copy the asset files even if they are already published before.
@return string the url.
@throws CException if the asset manager cannot be located.
Publishes an asset path .