You are here

public static function WebformSharePreRender::page in Webform 8.5

Same name and namespace in other branches
  1. 6.x modules/webform_share/src/WebformSharePreRender.php \Drupal\webform_share\WebformSharePreRender::page()

Prerender callback for page.

File

modules/webform_share/src/WebformSharePreRender.php, line 17

Class

WebformSharePreRender
Implements trusted prerender callbacks for the Webform share module.

Namespace

Drupal\webform_share

Code

public static function page($element) {
  if (!WebformShareHelper::isPage()) {
    return $element;
  }

  // Remove all theme wrappers from the page template.
  $element['#theme_wrappers'] = [];
  return $element;
}