/**
  * @see lib/vendor/symfony/lib/debug/sfWebDebugPanel#getPanelContent()
  */
 public function getPanelContent()
 {
     try {
         $manager = sfAssetsManager::getInstance();
         $packages = $manager->getPackages();
         $loadedPackages = self::$loadedPackages;
         ob_start();
         include dirname(__FILE__) . '/_panel.html.php';
         $html = ob_get_contents();
         ob_end_clean();
     } catch (Exception $e) {
         $html = 'Unable to render the sfAssetsManager toolbar';
     }
     return $html;
 }
/**
 * Loads assets into the Response from configuration file
 * @param string $package
 * @param string $assetsType optional
 */
function load_assets($package, $assetsType = null)
{
    sfAssetsManager::getInstance()->load($package, $assetsType);
}
 /**
  * Loads js and css files to the response. This is an abstraction layer
  * for no dependency of sfAssetsManagerPlugin
  * @see sfAssetsManagerPlugin
  * @param string $package package name to load
  * @param sfWebResponse optional. Context Response by default
  */
 public static function loadAssets($package, sfWebResponse $response = null)
 {
     $response = $response ? $response : sfContext::getInstance()->getResponse();
     // sfAssetsManager
     if (class_exists('sfAssetsManager')) {
         $manager = sfAssetsManager::getInstance();
         $manager->load(sprintf('sfMediaBrowser.%s', $package));
     } else {
         $config = sfConfig::get(sprintf('app_sf_media_browser_assets_%s', $package));
         if (isset($config['js']) && !empty($config['js'])) {
             foreach ((array) $config['js'] as $js) {
                 $response->addJavascript($js);
             }
         }
         if (isset($config['css']) && !empty($config['css'])) {
             foreach ((array) $config['css'] as $css) {
                 $response->addStylesheet($css);
             }
         }
     }
 }