public function testExternalGenerateLinkObject() { $url = Url::generateLinkObject(['type' => 2, 'value' => 'https://luya.io']); $this->assertInstanceOf('luya\\web\\LinkInterface', $url); $this->assertSame('_blank', $url->getTarget()); }
private function getLinkUrl() { $content = $this->getContextConfigValue($this->varName); return Url::generateLinkObject($content); }
/** * Generate the link object from the given database array value. * * @param array $config The configuration array must contain the keys `value` and `type`. * @return string The parsed link source based on the input type. */ protected function generateLinkObject(array $config) { return Url::generateLinkObject($config); }