behaviors/ExtensionBehavior.php
public function publishAssets($path, $forceCopy = false)
    {
        if (!Yii::app()->hasComponent('assetManager')) {
            return false; // ignore this method while ran from the console
        }
        /* @var CAssetManager $assetManager */
        $assetManager = Yii::app()->getComponent('assetManager');
        if (($basePath = $this->getPath()) !== false) {
            $path = $basePath . DIRECTORY_SEPARATOR . $path;
        }
        $assetsUrl = $assetManager->publish($path, false, -1, $forceCopy);
        return $this->_assetsUrl = $assetsUrl;
    }
public function publishAssets($path, $forceCopy = false)
    {
        if (!Yii::app()->hasComponent('assetManager')) {
            return false; // ignore this method while ran from the console
        }
        /* @var CAssetManager $assetManager */
        $assetManager = Yii::app()->getComponent('assetManager');
        if (($basePath = $this->getPath()) !== false) {
            $path = $basePath . DIRECTORY_SEPARATOR . $path;
        }
        $assetsUrl = $assetManager->publish($path, false, -1, $forceCopy);
        return $this->_assetsUrl = $assetsUrl;
    }
public function publishAssets ( $ path , $ forceCopy = false ) { if ( ! Yii :: app ( ) -> hasComponent ( 'assetManager' ) ) { return false ; // ignore this method while ran from the console } /* @var CAssetManager $assetManager */ $ assetManager = Yii :: app ( ) -> getComponent ( 'assetManager' ) ; if ( ( $ basePath = $ this -> getPath ( ) ) !== false ) { $ path = $ basePath . DIRECTORY_SEPARATOR . $ path ; } $ assetsUrl = $ assetManager -> publish ( $ path , false , - 1 , $ forceCopy ) ; return $ this -> _assetsUrl = $ assetsUrl ; }
Publishes the extension assets.
@param string $path assets path.
@param boolean $forceCopy whether we should copy the asset file or directory
even if it is already published before.
@return string the url.
Publishes the extension assets .