/** * @param string $name The filename of the template * @return \Twig_Template */ public static function getTemplate($name) { $templateRoot = self::getInstance(); /* @var $templateRoot \jvwp\TemplateLibrary */ $fullName = $templateRoot->getFullTemplateName($name); return Templates::getTemplate($fullName); }
/** * Gets the HTML markup of the component * * @param bool $showLabel * * @return mixed */ public function getHTML($showLabel = true) { return parent::getHTML(false) . Templates::getTemplate($this->getTemplateLocation())->render(array('id' => $this->getId(), 'showLabel' => $showLabel || $this->overrideShowLabel, 'label' => $this->label, 'resolution' => $this->resolution, 'displaySize' => $this->displaySize)); }
<?php \jvwp\Templates::addPath(__DIR__ . '/templates', 'jvwp');