protected function getTemplateFile()
 {
     $list = new InnerTemplateList();
     $templateToUse = $list->getTemplate($this->request->innerTemplate);
     if ($templateToUse == null) {
         throw new Exception('Inneres Template nicht gefunden');
     }
     return $templateToUse->getTemplateFile();
 }
 /**
  * @inheritdoc
  */
 public function toHtml()
 {
     $this->templates = new InnerTemplateList($this->outerTemplate->name);
     $div = Html::create('div')->css('chooseTemplateDiv')->css('row');
     Html::create('input')->attr('type', 'hidden')->attr('name', $this->id)->attr('id', $this->id)->attr('value', $this->chosenTemplate)->addTo($div);
     foreach ($this->templates->getTemplates() as $template) {
         $innerDiv = Html::create('div')->css('col-md-1')->addTo($div);
         $a = Html::create('a')->css('chooseTemplate')->attr('href', '#')->attr('title', $template->getName())->addTo($innerDiv);
         if ($this->chosenTemplate === $template->getName()) {
             $a->css('chosen');
         }
         Html::create('img')->attr('src', $template->getThumbnailUrl())->addTo($a);
     }
     return $div->render();
 }