Open Data Catalog
v2.0.0
UrlHostTokenResolver.php
Go to the documentation of this file.
1
<?php
2
3
namespace
Drupal\dkan_common
;
4
8
class
UrlHostTokenResolver
{
9
const
TOKEN
=
"h-o.st"
;
10
16
public
static
function
resolve
($string) {
17
if
(substr_count($string, self::TOKEN) > 0) {
18
$string = str_replace(self::TOKEN, \Drupal::request()->getHost(), $string);
19
}
20
return
$string;
21
}
22
23
}
Drupal\dkan_common\UrlHostTokenResolver
Definition:
UrlHostTokenResolver.php:8
Drupal\dkan_common
Definition:
AbstractDataNodeLifeCycle.php:3
Drupal\dkan_common\UrlHostTokenResolver\TOKEN
const TOKEN
Definition:
UrlHostTokenResolver.php:9
Drupal\dkan_common\UrlHostTokenResolver\resolve
static resolve($string)
Definition:
UrlHostTokenResolver.php:16
modules
dkan_common
src
UrlHostTokenResolver.php
Generated by
1.8.17