You are here

public function BlazyVideoTrait::getHost in Blazy 7

Returns the host for scheme.

1 call to BlazyVideoTrait::getHost()
BlazyFilter::buildImageItem in src/Plugin/Filter/BlazyFilter.php

File

src/Plugin/Field/FieldFormatter/BlazyVideoTrait.php, line 114

Class

BlazyVideoTrait
A Trait common for Media integration with field details.

Namespace

Drupal\blazy\Plugin\Field\FieldFormatter

Code

public function getHost($url) {
  $host = preg_replace('/^www\\./', '', parse_url($url, PHP_URL_HOST));
  $host = explode(".", $host);
  return $host[0];
}