Same name and namespace in other branches
  1. 8.9.x core/lib/Drupal/Core/TypedData/TranslationStatusInterface.php \Drupal\Core\TypedData\TranslationStatusInterface
  2. 9 core/lib/Drupal/Core/TypedData/TranslationStatusInterface.php \Drupal\Core\TypedData\TranslationStatusInterface

Defines an interface for checking the status of an entity translation.

Hierarchy

Expanded class hierarchy of TranslationStatusInterface

All classes that implement TranslationStatusInterface

2 files declare their use of TranslationStatusInterface
ContentEntityStorageBase.php in core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php
EntityTranslationTest.php in core/tests/Drupal/KernelTests/Core/Entity/EntityTranslationTest.php

File

core/lib/Drupal/Core/TypedData/TranslationStatusInterface.php, line 8

Namespace

Drupal\Core\TypedData
View source
interface TranslationStatusInterface {

  /**
   * Status code identifying a removed translation.
   */
  const TRANSLATION_REMOVED = 0;

  /**
   * Status code identifying an existing translation.
   */
  const TRANSLATION_EXISTING = 1;

  /**
   * Status code identifying a newly created translation.
   */
  const TRANSLATION_CREATED = 2;

  /**
   * Returns the translation status.
   *
   * @param string $langcode
   *   The language code identifying the translation.
   *
   * @return int|null
   *   One of the TRANSLATION_* constants or NULL if the given translation does
   *   not exist.
   */
  public function getTranslationStatus($langcode);

}

Members

Namesort descending Modifiers Type Description Overrides
TranslationStatusInterface::getTranslationStatus public function Returns the translation status.
TranslationStatusInterface::TRANSLATION_CREATED constant Status code identifying a newly created translation.
TranslationStatusInterface::TRANSLATION_EXISTING constant Status code identifying an existing translation.
TranslationStatusInterface::TRANSLATION_REMOVED constant Status code identifying a removed translation.