protected function DefaultFieldProcessor::shouldTranslateProperty

Returns whether the property should be translated or not.

Parameters

\Drupal\Core\TypedData\TypedDataInterface $property: The field property to check.

Return value

bool TRUE if the property should be translated, FALSE otherwise.

1 call to DefaultFieldProcessor::shouldTranslateProperty()
DefaultFieldProcessor::extractTranslatableData in sources/content/src/DefaultFieldProcessor.php
Extracts the translatatable data structure from the given field.

File

sources/content/src/DefaultFieldProcessor.php, line 139

Class

DefaultFieldProcessor
Default field processor.

Namespace

Drupal\tmgmt_content

Code

protected function shouldTranslateProperty(TypedDataInterface $property) {

  // Ignore properties with limited allowed values or if they're not strings.
  if ($property instanceof OptionsProviderInterface || !$property instanceof StringInterface) {
    return FALSE;
  }
  return TRUE;
}