You are here

protected function Embed::getClass in CKEditor Media Embed Plugin 8

Retrieve the HTML class to apply to the new embed html node.

Parameters

object $embed: The embed json decoded object as provided by Embed::getEmbedOjbect().

Return value

string The safe HTML class string to apply the new embed html node.

1 call to Embed::getClass()
Embed::swapEmbedHtml in src/Embed.php
Replace <oembed> tags with their respected embed HTML.

File

src/Embed.php, line 220

Class

Embed
The default CKEditor Media Embed class.

Namespace

Drupal\ckeditor_media_embed

Code

protected function getClass($embed) {
  return 'embed-media ' . Html::getClass("embed-media--{$embed->type}-{$embed->provider_name}");
}