code: private function loadTheme($theme)
      {
          if (!isset($theme)) {
              return;
          }
  
          $th = $this->findThemeByDirectory($theme);
  
          if (isset($th)) {
              $viewFinder = $this->view->getFinder();
  
              $viewFinder->prependPath($th->getPath());
              if (!is_null($th->getParent())) {
                  $this->loadTheme($th->getParent());
              }
  
              $this->activeTheme = $theme;
          }
      }
docs: Load a theme
  
  @param string $theme
  @throws \Exception