public function getTemplateList()
 {
     $templateList = $this->service->findTemplateListForUserId($this->userId);
     $tplTemplates = array();
     foreach ($templateList as $tpl) {
         $tplTemplates[] = $this->getTplInfo($tpl);
     }
     return $tplTemplates;
 }
Beispiel #2
0
 public function onBeforeRender()
 {
     parent::onBeforeRender();
     $templateList = $this->service->findTemplateListForUserId($this->userId);
     $tplTemplates = array();
     foreach ($templateList as $tpl) {
         /*@var $tpl UHEADER_BOL_Template */
         $settings = $tpl->getSettings();
         $template = array("id" => $tpl->id, "src" => $this->service->getTemplateUrl($tpl), "css" => $tpl->getCssString(), "canvas" => $tpl->getCanvas(self::ITEM_WIDTH));
         $tplTemplates[] = $template;
     }
     $this->assign("templates", $tplTemplates);
     $this->assign("dimensions", $this->dimensions);
     $js = UTIL_JsGenerator::composeJsString('UHEADER.GallerySwitcher.registerTab({$tabKey}, new UHEADER.TemplateGallery({$params}, _scope));', array('params' => array('userId' => $this->userId, 'tabKey' => $this->tabKey, "dimensions" => $this->dimensions), "tabKey" => $this->tabKey));
     OW::getDocument()->addOnloadScript($js);
 }