interface TranslationStatusInterface
Same name in other branches
- 9 core/lib/Drupal/Core/TypedData/TranslationStatusInterface.php \Drupal\Core\TypedData\TranslationStatusInterface
- 8.9.x core/lib/Drupal/Core/TypedData/TranslationStatusInterface.php \Drupal\Core\TypedData\TranslationStatusInterface
- 11.x 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);
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overrides |
---|---|---|---|---|
TranslationStatusInterface::getTranslationStatus | public | function | Returns the translation status. | 1 |
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. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.