original_string: protected function loadMainScriptByHandle($mainHandle)
      {
          $deps = $this->getScriptDeps($mainHandle);
  
          if (file_exists(sprintf('%s/js/%s.js', $this->paths->getThemeAssetsDir(), $mainHandle))) {
              $mainSrc = sprintf('%s/js/%s.js', $this->paths->getThemeAssetsUri(), $mainHandle);
          } else {
              // load empty script in case we need to load dependencies
              $mainSrc = sprintf('%s/js/%s.js', $this->paths->getBaseAssetsUri(), $mainHandle);
          }
  
          $this->loadScript($mainHandle, $mainSrc, $deps, true);
      }
code: protected function loadMainScriptByHandle($mainHandle)
      {
          $deps = $this->getScriptDeps($mainHandle);
  
          if (file_exists(sprintf('%s/js/%s.js', $this->paths->getThemeAssetsDir(), $mainHandle))) {
              $mainSrc = sprintf('%s/js/%s.js', $this->paths->getThemeAssetsUri(), $mainHandle);
          } else {
              // load empty script in case we need to load dependencies
              $mainSrc = sprintf('%s/js/%s.js', $this->paths->getBaseAssetsUri(), $mainHandle);
          }
  
          $this->loadScript($mainHandle, $mainSrc, $deps, true);
      }
code_tokens: protected function loadMainScriptByHandle ( $ mainHandle ) { $ deps = $ this -> getScriptDeps ( $ mainHandle ) ; if ( file_exists ( sprintf ( '%s/js/%s.js' , $ this -> paths -> getThemeAssetsDir ( ) , $ mainHandle ) ) ) { $ mainSrc = sprintf ( '%s/js/%s.js' , $ this -> paths -> getThemeAssetsUri ( ) , $ mainHandle ) ; } else { // load empty script in case we need to load dependencies $ mainSrc = sprintf ( '%s/js/%s.js' , $ this -> paths -> getBaseAssetsUri ( ) , $ mainHandle ) ; } $ this -> loadScript ( $ mainHandle , $ mainSrc , $ deps , true ) ; }
docstring: Loads a main script file using handle conventions
  
  @param string $mainHandle The script handle
docstring_tokens: Loads a main script file using handle conventions