original_string: protected function buildScriptText()
      {
          $controlId  = Builder::escapeText($this->control->getId());
          $scriptText = '';
          $closeBlock = false;
          if (ScriptLabel::isEventLabel($this->labelName)) {
              $scriptText .= "
  if (Event.ControlId == {$controlId}) {
  declare Control <=> Event.Control;";
              $closeBlock = true;
          } else {
              $scriptText .= "
  declare Control <=> Page.GetFirstChild({$controlId});";
          }
          $class      = $this->control->getManiaScriptClass();
          $name       = preg_replace('/^CMl/', '', $class, 1);
          $scriptText .= "
  declare {$name} <=> (Control as {$class});
  ";
          $scriptText .= $this->scriptText . "
  ";
          if ($closeBlock) {
              $scriptText .= "}";
          }
          return $scriptText;
      }
code: protected function buildScriptText()
      {
          $controlId  = Builder::escapeText($this->control->getId());
          $scriptText = '';
          $closeBlock = false;
          if (ScriptLabel::isEventLabel($this->labelName)) {
              $scriptText .= "
  if (Event.ControlId == {$controlId}) {
  declare Control <=> Event.Control;";
              $closeBlock = true;
          } else {
              $scriptText .= "
  declare Control <=> Page.GetFirstChild({$controlId});";
          }
          $class      = $this->control->getManiaScriptClass();
          $name       = preg_replace('/^CMl/', '', $class, 1);
          $scriptText .= "
  declare {$name} <=> (Control as {$class});
  ";
          $scriptText .= $this->scriptText . "
  ";
          if ($closeBlock) {
              $scriptText .= "}";
          }
          return $scriptText;
      }
code_tokens: protected function buildScriptText ( ) { $ controlId = Builder :: escapeText ( $ this -> control -> getId ( ) ) ; $ scriptText = '' ; $ closeBlock = false ; if ( ScriptLabel :: isEventLabel ( $ this -> labelName ) ) { $ scriptText .= "
  if (Event.ControlId == {$controlId}) {
  declare Control <=> Event.Control;" ; $ closeBlock = true ; } else { $ scriptText .= "
  declare Control <=> Page.GetFirstChild({$controlId});" ; } $ class = $ this -> control -> getManiaScriptClass ( ) ; $ name = preg_replace ( '/^CMl/' , '' , $ class , 1 ) ; $ scriptText .= "
  declare {$name} <=> (Control as {$class});
  " ; $ scriptText .= $ this -> scriptText . "
  " ; if ( $ closeBlock ) { $ scriptText .= "}" ; } return $ scriptText ; }
docstring: Build the script text for the Control
  
  @return string
docstring_tokens: Build the script text for the Control