protected function render ()
  {
    $prop   = $this->props;
    $assets = $this->context->getAssetsService ();

    if (exists ($prop->var))
      $assets->addInlineScript (sprintf ('var %s=%s;', $prop->var, javascriptLiteral ($prop->export, false)));

    elseif (exists ($prop->src))
      $assets->addScript ($prop->src, $this->props->prepend);

    elseif ($this->hasChildren ())
      $assets->addInlineScript (self::getRenderingOfSet ($this->getChildren ()), $prop->name, $this->props->prepend);
  }
protected function render ()
  {
    $prop   = $this->props;
    $assets = $this->context->getAssetsService ();

    if (exists ($prop->var))
      $assets->addInlineScript (sprintf ('var %s=%s;', $prop->var, javascriptLiteral ($prop->export, false)));

    elseif (exists ($prop->src))
      $assets->addScript ($prop->src, $this->props->prepend);

    elseif ($this->hasChildren ())
      $assets->addInlineScript (self::getRenderingOfSet ($this->getChildren ()), $prop->name, $this->props->prepend);
  }
protected function render ( ) { $ prop = $ this -> props ; $ assets = $ this -> context -> getAssetsService ( ) ; if ( exists ( $ prop -> var ) ) $ assets -> addInlineScript ( sprintf ( 'var %s=%s;' , $ prop -> var , javascriptLiteral ( $ prop -> export , false ) ) ) ; elseif ( exists ( $ prop -> src ) ) $ assets -> addScript ( $ prop -> src , $ this -> props -> prepend ) ; elseif ( $ this -> hasChildren ( ) ) $ assets -> addInlineScript ( self :: getRenderingOfSet ( $ this -> getChildren ( ) ) , $ prop -> name , $ this -> props -> prepend ) ; }
Registers a script on the Page.
Registers a script on the Page .