setTheme() public method

public setTheme ( Theme $theme )
$theme Newscoop\Entity\Theme
 public function init()
 {
     $resource = new ResourceId(__CLASS__);
     $themeService = $resource->getService(IThemeService::NAME);
     /* @var $themeService Newscoop\Service\Implementation\ThemeServiceLocalFileSystem */
     $theme = $themeService->findById($this->_getParam('id'));
     /* @var $theme Newscoop\Entity\Theme */
     $this->view->themeId = $this->_getParam('id');
     $path = $theme->getPath();
     $fullPath = $themeService->toFullPath($theme);
     $root = str_replace($path, '', $fullPath);
     $storage = new Storage($fullPath);
     $repository = $this->_helper->entity->getRepository('Newscoop\\Entity\\Template')->setBasePath($path);
     $this->service = new Template($storage, $repository);
     $this->service->setTheme($theme);
     $this->_helper->contextSwitch->addActionContext('get-items', 'json')->addActionContext('cache-templates', 'json')->initContext();
     $this->view->basePath = $path;
 }