You are here

public static function SettingsHelper::isValidContentReplacementMode in Acquia Lift Connector 8.4

Same name and namespace in other branches
  1. 8.3 src/Service/Helper/SettingsHelper.php \Drupal\acquia_lift\Service\Helper\SettingsHelper::isValidContentReplacementMode()

Is a valid content replacement mode.

Parameters

string: Mode to compare

Return value

boolean True if valid, false otherwise.

2 calls to SettingsHelper::isValidContentReplacementMode()
PageContext::setContextAdvanced in src/Service/Context/PageContext.php
Set page context - advanced.
SettingsHelperTest::testIsValidContentReplacementMode in tests/src/Unit/Service/Helper/SettingsHelperTest.php
Tests the isValidContentReplacementMode() method.

File

src/Service/Helper/SettingsHelper.php, line 137

Class

SettingsHelper
Defines the Settings Helper class.

Namespace

Drupal\acquia_lift\Service\Helper

Code

public static function isValidContentReplacementMode($test_mode) {
  $valid_modes = [
    'trusted',
    'customized',
  ];
  return in_array($test_mode, $valid_modes);
}