summaryrefslogtreecommitdiffstats
path: root/core/lib/Drupal/Core/TypedData/TranslationStatusInterface.php
blob: 520b0fcf8dc701b54d3820da531f66d9c1218dc3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php

namespace Drupal\Core\TypedData;

/**
 * Defines an interface for checking the status of an entity translation.
 */
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);

}