Пример #1
0
 /**
  * Create a script
  * @param $code source code
  */
 public static function create($code, $show = TRUE)
 {
     $script = new TElement('script');
     $script->{'language'} = 'JavaScript';
     $script->setUseSingleQuotes(TRUE);
     $script->setUseLineBreaks(FALSE);
     $script->add($code);
     if ($show) {
         $script->show();
     }
     return $script;
 }