You are here

public function WebformShareScript::getInfo in Webform 6.x

Same name and namespace in other branches
  1. 8.5 modules/webform_share/src/Element/WebformShareScript.php \Drupal\webform_share\Element\WebformShareScript::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/WebformShareScript.php, line 20

Class

WebformShareScript
Provides a render element that creates a <script> tag to share a webform.

Namespace

Drupal\webform_share\Element

Code

public function getInfo() {
  $class = get_class($this);
  return [
    '#webform' => NULL,
    '#source_entity' => NULL,
    '#query' => [],
    '#theme' => 'webform_share_script',
    '#pre_render' => [
      [
        $class,
        'preRenderWebformShareScript',
      ],
    ],
  ];
}