Ejemplo n.º 1
0
 public function render(ContainerInterface $container)
 {
     $result = '';
     $assets = $container->getAssets();
     foreach ($assets as $asset) {
         /** @var $asset \Phoenix\Asset\AssetInterface $url */
         $result .= $this->getTagScript($asset);
     }
     return $result;
 }
Ejemplo n.º 2
0
 public function render(ContainerInterface $container)
 {
     $result = 'require([' . PHP_EOL;
     $assets = $container->getAssets();
     $urls = array();
     foreach ($assets as $asset) {
         /** @var $asset \Phoenix\Asset\AssetInterface $url */
         $urls[] = '"' . $this->toUrl($asset) . '"';
     }
     $result .= implode(',' . PHP_EOL, $urls);
     $result .= PHP_EOL . '], function() {
         require(["main"]);
     });';
     return $result;
 }