/** * {@inheritdoc} * @see \rakelley\jhframe\interfaces\services\IViewController::createView() */ public function createView($viewName, array $parameters = null, $cacheable = false) { $cacheKey = $this->getCacheKey($viewName); if ($cacheable && $this->cache->Read($cacheKey)) { $viewProperties = $this->cache->Read($cacheKey); } else { $viewProperties = $this->buildView($viewName, $parameters); if ($cacheable) { $this->cache->Write($viewProperties, $cacheKey); } } return $this->toRenderable($viewProperties); }
/** * Adds a link to the provided URL * * @param string|moodle_url $url * @param string $text * @param int $height */ public static function link($url, $text, $height = 10) { if (typeof($url) == 'moodle_url') { $url = $url->out(); } self::$pdf->Write($height, $text, $url); return self::$pdf; }