TranslationStatusInterface.php 782 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. namespace Drupal\Core\TypedData;
  3. /**
  4. * Defines an interface for checking the status of an entity translation.
  5. */
  6. interface TranslationStatusInterface {
  7. /**
  8. * Status code identifying a removed translation.
  9. */
  10. const TRANSLATION_REMOVED = 0;
  11. /**
  12. * Status code identifying an existing translation.
  13. */
  14. const TRANSLATION_EXISTING = 1;
  15. /**
  16. * Status code identifying a newly created translation.
  17. */
  18. const TRANSLATION_CREATED = 2;
  19. /**
  20. * Returns the translation status.
  21. *
  22. * @param string $langcode
  23. * The language code identifying the translation.
  24. *
  25. * @return int|null
  26. * One of the TRANSLATION_* constants or NULL if the given translation does
  27. * not exist.
  28. */
  29. public function getTranslationStatus($langcode);
  30. }