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