code: protected function getTemplate($strTemplate, $strFormat = 'html5', $blnFailIfNotFound = false)
      {
          $strTemplate = basename($strTemplate);
          $strCustom   = 'templates';
          // Check for a theme folder.
          if (TL_MODE == 'FE') {
              $tmpDir = str_replace('../', '', $GLOBALS['objPage']->templateGroup);
              if (!empty($tmpDir)) {
                  $strCustom = $tmpDir;
              }
          }
  
          try {
              return \TemplateLoader::getPath($strTemplate, $strFormat, $strCustom);
          } catch (\Exception $exception) {
              if ($blnFailIfNotFound) {
                  throw new \RuntimeException(
                      sprintf('Could not find template %s.%s', $strTemplate, $strFormat),
                      1,
                      $exception
                  );
              }
          }
  
          return null;
      }
docs: Find a particular template file and return its path.
  
  @param string $strTemplate       Name of the template file.
  
  @param string $strFormat         The format to search for.
  
  @param bool   $blnFailIfNotFound Boolean flag telling if an Exception shall be thrown when the file can not
  be found.
  
  @throws \RuntimeException When the flag has been set and the file has not been found.
  
  @return string
  
  @SuppressWarnings(PHPMD.Superglobals)
  @SuppressWarnings(PHPMD.CamelCaseVariableName)