interface TranslationStatusInterface in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/TypedData/TranslationStatusInterface.php \Drupal\Core\TypedData\TranslationStatusInterface
- 9 core/lib/Drupal/Core/TypedData/TranslationStatusInterface.php \Drupal\Core\TypedData\TranslationStatusInterface
Defines an interface for checking the status of an entity translation.
Hierarchy
- interface \Drupal\Core\TypedData\TranslationStatusInterface
Expanded class hierarchy of TranslationStatusInterface
All classes that implement TranslationStatusInterface
3 files declare their use of TranslationStatusInterface
- ContentEntityBase.php in core/
lib/ Drupal/ Core/ Entity/ ContentEntityBase.php - 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\TypedDataView 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);
}