Exemplo n.º 1
0
 /**
  * Make the cache for an asset type and display the html 
  * code to include the asset type.
  * 
  * @access public
  * @param string $type
  * @return string
  */
 public function displayAssetType($type)
 {
     $files = $this->assetManager->getAssetFiles($type);
     // If there are no files for the given type return here.
     if ($files === false) {
         return;
     }
     if ($this->combineAssets) {
         $this->displayCombinedAssets($type, $files);
     } else {
         foreach ($files as $file) {
             $cachedFile = $this->generateCachedFile($type, $file->getFileName());
             if ($cachedFile !== false) {
                 echo $this->generateHtmlCode($type, $cachedFile['file']);
             }
         }
     }
 }