original_string: public static function preSaveText($text, $controller, $transTable = [])
      {
          $module = Module::getModuleByClassname(Module::className());
          $editorContentHelper = $module->contentHelper;
  
          $text = trim($text);
          if (empty($text)) return '';
          
          $text = $editorContentHelper::afterSelectBody($text); // convert @uploads/.../ID to realpath
  
          $text = strtr($text, $transTable);
  
          $html = $text;
          $viewFile = dirname(__DIR__) . '/views/news-archieve-text.php';
          if (is_file($viewFile)) {
              $text = static::START_TEXT_TAG . $text . static::END_TEXT_TAG;
              $html = Yii::$app->view->renderFile($viewFile, ['text' => $text], $controller);
          }
          return $html;
      }
code: public static function preSaveText($text, $controller, $transTable = [])
      {
          $module = Module::getModuleByClassname(Module::className());
          $editorContentHelper = $module->contentHelper;
  
          $text = trim($text);
          if (empty($text)) return '';
          
          $text = $editorContentHelper::afterSelectBody($text); // convert @uploads/.../ID to realpath
  
          $text = strtr($text, $transTable);
  
          $html = $text;
          $viewFile = dirname(__DIR__) . '/views/news-archieve-text.php';
          if (is_file($viewFile)) {
              $text = static::START_TEXT_TAG . $text . static::END_TEXT_TAG;
              $html = Yii::$app->view->renderFile($viewFile, ['text' => $text], $controller);
          }
          return $html;
      }
code_tokens: public static function preSaveText ( $ text , $ controller , $ transTable = [ ] ) { $ module = Module :: getModuleByClassname ( Module :: className ( ) ) ; $ editorContentHelper = $ module -> contentHelper ; $ text = trim ( $ text ) ; if ( empty ( $ text ) ) return '' ; $ text = $ editorContentHelper :: afterSelectBody ( $ text ) ; // convert @uploads/.../ID to realpath
   $ text = strtr ( $ text , $ transTable ) ; $ html = $ text ; $ viewFile = dirname ( __DIR__ ) . '/views/news-archieve-text.php' ; if ( is_file ( $ viewFile ) ) { $ text = static :: START_TEXT_TAG . $ text . static :: END_TEXT_TAG ; $ html = Yii :: $ app -> view -> renderFile ( $ viewFile , [ 'text' => $ text ] , $ controller ) ; } return $ html ; }
docstring: Processing text before saving.
  @param string $text
  @param Controller $controller
  @param array $transTable
  @return string
docstring_tokens: Processing text before saving .