public function TagView::getClickUrl in Doubleclick for Publishers (DFP) 8
Gets the click URL.
Return value
string The click URL.
File
- src/
View/ TagView.php, line 391 - Contains \Drupal\dfp\View\TagView.
Class
- TagView
- A value object to combine a DFP tag with global settings for display.
Namespace
Drupal\dfp\ViewCode
public function getClickUrl() {
// Since this can't change during a request statically cache it.
if (is_null(self::$clickUrl)) {
self::$clickUrl = (string) $this->globalSettings
->get('click_url');
if (self::$clickUrl && !preg_match("/^https?:\\/\\//", self::$clickUrl)) {
self::$clickUrl = Url::fromUserInput(self::$clickUrl, [
'absolute' => TRUE,
])
->toString();
}
}
return self::$clickUrl;
}