protected function unifyScripts()
 {
     parent::unifyScripts();
     $this->afterUnifyScripts();
     // raise our event
     // after all manipulations and filtration of registered resources
     $this->_publishExtensionClientInit();
     // this js code should be included on each AJAX request
     $this->_publishRegisteredResourcesUpdater();
 }
Beispiel #2
0
 /**
  * Extending unifyScripts in order to hook the cache buster in at the right
  * point in the render method.
  */
 protected function unifyScripts()
 {
     parent::unifyScripts();
     $cacheBuster = Yii::app()->cacheBuster;
     // JS
     foreach ($this->scriptFiles as $pos => $scriptFiles) {
         foreach ($scriptFiles as $key => $scriptFile) {
             unset($this->scriptFiles[$pos][$key]);
             // Add cache buster string to url.
             $scriptUrl = $cacheBuster->createUrl($scriptFile);
             $this->scriptFiles[$pos][$scriptUrl] = $scriptFile;
         }
     }
     // CSS
     foreach ($this->cssFiles as $cssFile => $media) {
         unset($this->cssFiles[$cssFile]);
         // Add cache buster string to url.
         $cssFile = $cacheBuster->createUrl($cssFile);
         $this->cssFiles[$cssFile] = $media;
     }
 }