You are here

public function MockProvider::renderEmbedCode in Video Embed Field 8

Same name and namespace in other branches
  1. 8.2 tests/modules/video_embed_field_mock_provider/src/Plugin/video_embed_field/Provider/MockProvider.php \Drupal\video_embed_field_mock_provider\Plugin\video_embed_field\Provider\MockProvider::renderEmbedCode()

Render embed code.

Parameters

string $width: The width of the video player.

string $height: The height of the video player.

bool $autoplay: If the video should autoplay.

Return value

mixed A renderable array of the embed code.

Overrides ProviderPluginInterface::renderEmbedCode

File

tests/modules/video_embed_field_mock_provider/src/Plugin/video_embed_field/Provider/MockProvider.php, line 36

Class

MockProvider
A mock video provider for use in tests.

Namespace

Drupal\video_embed_field_mock_provider\Plugin\video_embed_field\Provider

Code

public function renderEmbedCode($width, $height, $autoplay) {
  return [
    '#markup' => 'Mock provider embed code.',
  ];
}