You are here

public function ContentTranslationMetadataWrapper::setSource in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/content_translation/src/ContentTranslationMetadataWrapper.php \Drupal\content_translation\ContentTranslationMetadataWrapper::setSource()

Sets the source language for this translation.

Parameters

string $source: The source language code.

Return value

$this

Overrides ContentTranslationMetadataWrapperInterface::setSource

File

core/modules/content_translation/src/ContentTranslationMetadataWrapper.php, line 55
Contains \Drupal\content_translation\ContentTranslationMetadataWrapper.

Class

ContentTranslationMetadataWrapper
Base class for content translation metadata wrappers.

Namespace

Drupal\content_translation

Code

public function setSource($source) {
  $this->translation
    ->set('content_translation_source', $source);
  return $this;
}