/** * @return Template */ private function buildTemplate() { if ($this->builtTemplate === NULL) { $options = $this->configuration->getOptions(); $template = new Template($this->latteEngine); $template->setParameters(['config' => ArrayHash::from($options), 'basePath' => $options[CO::TEMPLATE][TCO::TEMPLATES_PATH]]); $this->builtTemplate = $template; } return $this->templateElementsLoader->addElementsToTemplate($this->builtTemplate); }
/** * @param string $name * @return string */ public function getTemplateFileName($name) { $options = $this->configuration->getOptions(); return $this->getDestination() . '/' . $options[CO::TEMPLATE][TCO::TEMPLATES][$name]['filename']; }
/** * {@inheritdoc} */ public function isAllowed() { $options = $this->configuration->getOptions(); return $options[CO::GOOGLE_CSE_ID] && $options[CO::BASE_URL]; }