You are here

public static function ContentSyncDialogHelper::getOffCanvasTriggerName in Content Synchronization 3.0.x

Same name and namespace in other branches
  1. 8.2 src/Utility/ContentSyncDialogHelper.php \Drupal\content_sync\Utility\ContentSyncDialogHelper::getOffCanvasTriggerName()
  2. 8 src/Utility/ContentSyncDialogHelper.php \Drupal\content_sync\Utility\ContentSyncDialogHelper::getOffCanvasTriggerName()

Get Off canvas trigger name.

Return value

string The off canvas trigger name.

See also

Issue #2862625: Rename offcanvas to two words in code and comments.

https://www.drupal.org/node/2862625

1 call to ContentSyncDialogHelper::getOffCanvasTriggerName()
ContentSyncDialogHelper::getModalDialogAttributes in src/Utility/ContentSyncDialogHelper.php
Get modal dialog attributes.

File

src/Utility/ContentSyncDialogHelper.php, line 29

Class

ContentSyncDialogHelper
Helper class for dialog methods.

Namespace

Drupal\content_sync\Utility

Code

public static function getOffCanvasTriggerName() {
  if (isset(self::$offCanvasTriggerName)) {
    return self::$offCanvasTriggerName;
  }
  $main_content_renderers = \Drupal::getContainer()
    ->getParameter('main_content_renderers');
  if (isset($main_content_renderers['drupal_dialog_offcanvas'])) {
    self::$offCanvasTriggerName = 'offcanvas';
  }
  else {
    self::$offCanvasTriggerName = 'off_canvas';
  }
  return self::$offCanvasTriggerName;
}