protected function WebformConfigProcessor::isTranslatable

Returns whether the value should be treated as translatable.

If the value only consists of a token then treat it as untranslatable.

Parameters

string $value: The configuration value.

Return value

bool TRUE if it is translatable, FALSE otherwise.

2 calls to WebformConfigProcessor::isTranslatable()
WebformConfigProcessor::convertElementsToData in sources/tmgmt_config/src/WebformConfigProcessor.php
Converts the webform elements structure to translatable data.
WebformConfigProcessor::extractTranslatables in sources/tmgmt_config/src/WebformConfigProcessor.php

File

sources/tmgmt_config/src/WebformConfigProcessor.php, line 142

Class

WebformConfigProcessor

Namespace

Drupal\tmgmt_config

Code

protected function isTranslatable($value) {
  $translatable = TRUE;
  if (preg_match('/^\\[[a-z-_:]+\\]$/', $value)) {
    $translatable = FALSE;
  }
  return $translatable;
}