예제 #1
0
 public function testExternalGenerateLinkObject()
 {
     $url = Url::generateLinkObject(['type' => 2, 'value' => 'https://luya.io']);
     $this->assertInstanceOf('luya\\web\\LinkInterface', $url);
     $this->assertSame('_blank', $url->getTarget());
 }
예제 #2
0
 private function getLinkUrl()
 {
     $content = $this->getContextConfigValue($this->varName);
     return Url::generateLinkObject($content);
 }
예제 #3
0
 /**
  * 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);
 }