You are here

public function WebformComposite::preview in Webform Composite Tools 8

Generate a renderable preview of the element.

Return value

array A renderable preview of the element.

Overrides WebformElementBase::preview

File

src/Plugin/WebformElement/WebformComposite.php, line 60

Class

WebformComposite
Provides an Global Composite base.

Namespace

Drupal\webform_composite\Plugin\WebformElement

Code

public function preview() {
  return [
    '#type' => $this
      ->getBaseId(),
    '#webform_composite' => $this
      ->getPluginId(),
    '#title' => $this
      ->getPluginLabel(),
  ];
}