TranslationStatusInterface.php

Same filename in other branches
  1. 8.9.x core/lib/Drupal/Core/TypedData/TranslationStatusInterface.php
  2. 10 core/lib/Drupal/Core/TypedData/TranslationStatusInterface.php
  3. 11.x core/lib/Drupal/Core/TypedData/TranslationStatusInterface.php

Namespace

Drupal\Core\TypedData

File

core/lib/Drupal/Core/TypedData/TranslationStatusInterface.php

View source
<?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);

}

Interfaces

Title Deprecated Summary
TranslationStatusInterface Defines an interface for checking the status of an entity translation.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.