public function Single::getUrls in Siteimprove 8
Return urls for active domains for this entity.
If http/https isn't specified in domain name, use the backend's scheme.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: Entity to get active domain names for.
Return value
array Array of domain names without trailing slash.
Overrides SiteimproveDomainBase::getUrls
File
- src/
Plugin/ SiteimproveDomain/ Single.php, line 91
Class
- Single
- Provides simple plugin instance of Siteimprove Domain settings.
Namespace
Drupal\siteimprove\Plugin\SiteimproveDomainCode
public function getUrls(EntityInterface $entity) {
$config = $this
->config('siteimprove.domain.single.settings');
$domain = $config
->get('domain');
$scheme = preg_match('/^https?:\\/\\//', $domain) ? '' : $this->request
->getScheme() . '://';
return [
$scheme . $domain,
];
}