class WebformSharePreRender in Webform 8.5
Same name and namespace in other branches
- 6.x modules/webform_share/src/WebformSharePreRender.php \Drupal\webform_share\WebformSharePreRender
Implements trusted prerender callbacks for the Webform share module.
@internal
Hierarchy
- class \Drupal\webform_share\WebformSharePreRender implements TrustedCallbackInterface
Expanded class hierarchy of WebformSharePreRender
1 file declares its use of WebformSharePreRender
- webform_share.module in modules/
webform_share/ webform_share.module - Allows webforms to be shared on other websites using an iframe.
File
- modules/
webform_share/ src/ WebformSharePreRender.php, line 12
Namespace
Drupal\webform_shareView source
class WebformSharePreRender implements TrustedCallbackInterface {
/**
* Prerender callback for page.
*/
public static function page($element) {
if (!WebformShareHelper::isPage()) {
return $element;
}
// Remove all theme wrappers from the page template.
$element['#theme_wrappers'] = [];
return $element;
}
/**
* {@inheritdoc}
*/
public static function trustedCallbacks() {
return [
'page',
];
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
TrustedCallbackInterface:: |
constant | Untrusted callbacks throw exceptions. | ||
TrustedCallbackInterface:: |
constant | Untrusted callbacks trigger silenced E_USER_DEPRECATION errors. | ||
TrustedCallbackInterface:: |
constant | Untrusted callbacks trigger E_USER_WARNING errors. | ||
WebformSharePreRender:: |
public static | function | Prerender callback for page. | |
WebformSharePreRender:: |
public static | function |
Lists the trusted callbacks provided by the implementing class. Overrides TrustedCallbackInterface:: |