widgets/base/Widget.php
public function registerAssets()
    {
        // make sure core hasn't been registered previously

        $dirs = array('css', 'js');
        foreach ($this->assets as $key => $files) {
            if (in_array($key, $dirs)) {
                $files = is_array($files) ? $files : array($files);
                foreach ($files as $file) {
                    $filePath = Foundation::getAssetsPath() . DIRECTORY_SEPARATOR . $key . DIRECTORY_SEPARATOR . $file;
                    if (file_exists($filePath) && is_file($filePath)) {
                        $method = strcasecmp($key, 'css') === 0 ? 'registerCssFile' : 'registerScriptFile';
                        call_user_func(
                            array(\Yii::app()->clientScript, "$method"),
                            Foundation::getAssetsUrl() . "/$key/$file"
                        );
                    }
                }
            }
        }

    }
public function registerAssets()
    {
        // make sure core hasn't been registered previously

        $dirs = array('css', 'js');
        foreach ($this->assets as $key => $files) {
            if (in_array($key, $dirs)) {
                $files = is_array($files) ? $files : array($files);
                foreach ($files as $file) {
                    $filePath = Foundation::getAssetsPath() . DIRECTORY_SEPARATOR . $key . DIRECTORY_SEPARATOR . $file;
                    if (file_exists($filePath) && is_file($filePath)) {
                        $method = strcasecmp($key, 'css') === 0 ? 'registerCssFile' : 'registerScriptFile';
                        call_user_func(
                            array(\Yii::app()->clientScript, "$method"),
                            Foundation::getAssetsUrl() . "/$key/$file"
                        );
                    }
                }
            }
        }

    }
public function registerAssets ( ) { // make sure core hasn't been registered previously $ dirs = array ( 'css' , 'js' ) ; foreach ( $ this -> assets as $ key => $ files ) { if ( in_array ( $ key , $ dirs ) ) { $ files = is_array ( $ files ) ? $ files : array ( $ files ) ; foreach ( $ files as $ file ) { $ filePath = Foundation :: getAssetsPath ( ) . DIRECTORY_SEPARATOR . $ key . DIRECTORY_SEPARATOR . $ file ; if ( file_exists ( $ filePath ) && is_file ( $ filePath ) ) { $ method = strcasecmp ( $ key , 'css' ) === 0 ? 'registerCssFile' : 'registerScriptFile' ; call_user_func ( array ( \ Yii :: app ( ) -> clientScript , "$method" ) , Foundation :: getAssetsUrl ( ) . "/$key/$file" ) ; } } } } }
Registers the assets. Makes sure the assets pre-existed on the published folder prior registration.
Registers the assets . Makes sure the assets pre - existed on the published folder prior registration .