function ContentTranslationMetadataWrapper::__construct

Same name in other branches
  1. 9 core/modules/content_translation/src/ContentTranslationMetadataWrapper.php \Drupal\content_translation\ContentTranslationMetadataWrapper::__construct()
  2. 10 core/modules/content_translation/src/ContentTranslationMetadataWrapper.php \Drupal\content_translation\ContentTranslationMetadataWrapper::__construct()
  3. 11.x core/modules/content_translation/src/ContentTranslationMetadataWrapper.php \Drupal\content_translation\ContentTranslationMetadataWrapper::__construct()

Initializes an instance of the content translation metadata handler.

Parameters

\Drupal\Core\Entity\EntityInterface $translation: The entity translation to be wrapped.

ContentTranslationHandlerInterface $handler: The content translation handler.

File

core/modules/content_translation/src/ContentTranslationMetadataWrapper.php, line 35

Class

ContentTranslationMetadataWrapper
Base class for content translation metadata wrappers.

Namespace

Drupal\content_translation

Code

public function __construct(EntityInterface $translation, ContentTranslationHandlerInterface $handler) {
    $this->translation = $translation;
    $this->handler = $handler;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.