components/TbApi.php
protected function getBootstrapUrl()
    {
        if (!isset($this->_bootstrapUrl)) {
            if (isset($this->cdnUrl)) {
                $this->_bootstrapUrl = $this->cdnUrl;
            } else {
                if (($path = Yii::getPathOfAlias($this->bootstrapPath)) !== false) {
                    $this->bootstrapPath = $path;
                } else if ($this->bootstrapPath === false) {
                    throw new Exception("Invalid Bootstrap path and CDN URL not set. Set vendor.twbs.bootstrap.dist alias or cdnUrl parameter in the configuration file.");
                }
                $this->_bootstrapUrl = Yii::app()->assetManager->publish($this->bootstrapPath, false, -1, $this->forceCopyAssets);
            }
        }
        return $this->_bootstrapUrl;
    }
protected function getBootstrapUrl()
    {
        if (!isset($this->_bootstrapUrl)) {
            if (isset($this->cdnUrl)) {
                $this->_bootstrapUrl = $this->cdnUrl;
            } else {
                if (($path = Yii::getPathOfAlias($this->bootstrapPath)) !== false) {
                    $this->bootstrapPath = $path;
                } else if ($this->bootstrapPath === false) {
                    throw new Exception("Invalid Bootstrap path and CDN URL not set. Set vendor.twbs.bootstrap.dist alias or cdnUrl parameter in the configuration file.");
                }
                $this->_bootstrapUrl = Yii::app()->assetManager->publish($this->bootstrapPath, false, -1, $this->forceCopyAssets);
            }
        }
        return $this->_bootstrapUrl;
    }
protected function getBootstrapUrl ( ) { if ( ! isset ( $ this -> _bootstrapUrl ) ) { if ( isset ( $ this -> cdnUrl ) ) { $ this -> _bootstrapUrl = $ this -> cdnUrl ; } else { if ( ( $ path = Yii :: getPathOfAlias ( $ this -> bootstrapPath ) ) !== false ) { $ this -> bootstrapPath = $ path ; } else if ( $ this -> bootstrapPath === false ) { throw new Exception ( "Invalid Bootstrap path and CDN URL not set. Set vendor.twbs.bootstrap.dist alias or cdnUrl parameter in the configuration file." ) ; } $ this -> _bootstrapUrl = Yii :: app ( ) -> assetManager -> publish ( $ this -> bootstrapPath , false , - 1 , $ this -> forceCopyAssets ) ; } } return $ this -> _bootstrapUrl ; }
Returns the url to the published Bootstrap folder, or the CDN if applicable.
@return string the url.
@throws Exception
Returns the url to the published Bootstrap folder or the CDN if applicable .