You are here

public function YoastSeoManager::getSnippetEditorMarkup in Real-time SEO for Drupal 8

Get Markup for the snippet editor.

Return value

string HTML Markup of the snippet editor.

File

src/YoastSeoManager.php, line 292

Class

YoastSeoManager
Class YoastSeoManager.

Namespace

Drupal\yoast_seo

Code

public function getSnippetEditorMarkup() {

  // Get template for the snippet.
  $snippet_tpl = [
    '#theme' => 'yoast_snippet',
    '#wrapper_target_id' => self::$jsTargets['wrapper_target_id'],
    '#snippet_target_id' => self::$jsTargets['snippet_target_id'],
    '#output_target_id' => self::$jsTargets['output_target_id'],
  ];
  return \Drupal::service('renderer')
    ->renderRoot($snippet_tpl);
}