public function execute($configFiles)
 {
     $result = parent::execute($configFiles);
     $data = array();
     $first = true;
     foreach ($this->yamlConfig as $viewName => $values) {
         if ($viewName == 'all') {
             continue;
         }
         $data[] = ($first ? '' : 'else ') . "if (\$templateName.\$this->viewName == '{$viewName}')\n" . "{\n";
         $data[] = $this->addCustomizes($viewName);
         $data[] = "}\n";
         $first = false;
     }
     $data[] = ($first ? '' : "else\n{") . "\n";
     $data[] = $this->addCustomizes();
     $data[] = ($first ? '' : "}") . "\n";
     $result .= sprintf("// auto-generated by sfOpenPNEViewConfigHandler\n" . "// date: %s\n%s\n", date('Y/m/d H:i:s'), implode('', $data));
     return $result;
 }
 /**
  * Adds stylesheets and javascripts statements to the data.
  *
  * @param string $viewName The view name
  *
  * @return string The PHP statement
  */
 protected function addHtmlAsset($viewName = '')
 {
     // Disable for dev environment
     if (sfConfig::get('sf_debug') || sfConfig::get('sf_test')) {
         return parent::addHtmlAsset($viewName);
     }
     // Merge the current view's stylesheets with the app's default stylesheets
     $stylesheets = $this->mergeConfigValue('stylesheets', $viewName);
     // clean stylesheet list (-*)
     $stylesheets = $this->addAssets('stylesheets', $stylesheets, false);
     // combine
     $stylesheets = $this->combineValues('stylesheet', $stylesheets, $viewName);
     $css = $this->addAssets('Stylesheet', $stylesheets);
     // Merge the current view's javascripts with the app's default javascripts
     $javascripts = $this->mergeConfigValue('javascripts', $viewName);
     // clean stylesheet list (-*)
     $javascripts = $this->addAssets('javascripts', $javascripts, false);
     // combine
     $javascripts = $this->combineValues('javascript', $javascripts, $viewName);
     $js = $this->addAssets('Javascript', $javascripts);
     // set current js and css loaded, also add information about the current defined assets
     return implode("\n", array_merge($css, $js)) . "\n  \$response->defineCombinedAssets(" . var_export($this->debug_output, 1) . ");\n";
 }
 public function addHtmlAsset($viewName = '')
 {
     return parent::addHtmlAsset($viewName);
 }
 /**
  * Executes this configuration handler.
  *
  * @param array An array of absolute filesystem path to a configuration file
  *
  * @return string Data to be written to a cache file
  *
  * @throws <b>sfConfigurationException</b> If a requested configuration file does not exist or is not readable
  * @throws <b>sfParseException</b> If a requested configuration file is improperly formatted
  * @throws <b>sfInitializationException</b> If a view.yml key check fails
  */
 public function execute($configFiles)
 {
     $configFiles = array_merge($configFiles, $this->currentFlavorConfigFiles());
     return parent::execute($configFiles);
 }