You are here

public static function WebformShareHelper::isPage in Webform 6.x

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

Determine if the current page is a webform share page.

Return value

bool TRUE if the current page is a webform share page.

8 calls to WebformShareHelper::isPage()
WebformShareEventSubscriber::onResponse in modules/webform_share/src/EventSubscriber/WebformShareEventSubscriber.php
Remove 'X-Frame-Options' from the response header for shared webforms.
WebformSharePreRender::page in modules/webform_share/src/WebformSharePreRender.php
Prerender callback for page.
WebformShareThemeNegotiator::applies in modules/webform_share/src/Theme/WebformShareThemeNegotiator.php
Whether this theme negotiator should be used to set the theme.
webform_share_block_access in modules/webform_share/webform_share.module
Implements hook_block_access().
webform_share_page_top in modules/webform_share/webform_share.module
Implements hook_page_top().

... See full list

File

modules/webform_share/src/WebformShareHelper.php, line 18

Class

WebformShareHelper
Webform share helper class.

Namespace

Drupal\webform_share

Code

public static function isPage(RouteMatchInterface $route_match = NULL) {
  $route_match = $route_match ?: \Drupal::routeMatch();
  return strpos($route_match
    ->getRouteName(), 'entity.webform.share_page') === 0;
}