You are here

class UrlEmbed in URL Embed 8

A service class for handling URL embeds.

Hierarchy

Expanded class hierarchy of UrlEmbed

1 string reference to 'UrlEmbed'
url_embed.services.yml in ./url_embed.services.yml
url_embed.services.yml
1 service uses UrlEmbed
url_embed in ./url_embed.services.yml
Drupal\url_embed\UrlEmbed

File

src/UrlEmbed.php, line 15
Contains Drupal\url_embed\UrlEmbed.

Namespace

Drupal\url_embed
View source
class UrlEmbed implements UrlEmbedInterface {

  /**
   * @var array
   */
  public $config;

  /**
   * @{inheritdoc}
   */
  public function __construct(array $config = []) {
    $this->config = $config;
  }

  /**
   * @{inheritdoc}
   */
  public function getConfig() {
    return $this->config;
  }

  /**
   * @{inheritdoc}
   */
  public function setConfig(array $config) {
    $this->config = $config;
  }

  /**
   * @{inheritdoc}
   */
  public function getEmbed($request, array $config = []) {
    return Embed::create($request, $config ?: $this->config);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
UrlEmbed::$config public property
UrlEmbed::getConfig public function inheritdoc} Overrides UrlEmbedInterface::getConfig
UrlEmbed::getEmbed public function inheritdoc} Overrides UrlEmbedInterface::getEmbed
UrlEmbed::setConfig public function inheritdoc} Overrides UrlEmbedInterface::setConfig
UrlEmbed::__construct public function inheritdoc} Overrides UrlEmbedInterface::__construct