You are here

public function WebformShareIframe::getInfo in Webform 6.x

Same name and namespace in other branches
  1. 8.5 modules/webform_share/src/Element/WebformShareIframe.php \Drupal\webform_share\Element\WebformShareIframe::getInfo()

Returns the element properties for this element.

Return value

array An array of element properties. See \Drupal\Core\Render\ElementInfoManagerInterface::getInfo() for documentation of the standard properties of all elements, and the return value format.

Overrides ElementInterface::getInfo

File

modules/webform_share/src/Element/WebformShareIframe.php, line 30

Class

WebformShareIframe
Provides a render element that createa an iframe to share a webform.

Namespace

Drupal\webform_share\Element

Code

public function getInfo() {
  $class = get_class($this);
  return [
    '#webform' => NULL,
    '#source_entity' => NULL,
    '#javascript' => FALSE,
    '#script' => '//cdn.jsdelivr.net/gh/davidjbradshaw/iframe-resizer@' . static::VERSION . '/js/iframeResizer.min.js',
    '#query' => [],
    '#options' => [],
    '#test' => [],
    '#theme' => 'webform_share_iframe',
    '#pre_render' => [
      [
        $class,
        'preRenderWebformShareIframe',
      ],
    ],
  ];
}