You are here

interface LingotekTranslatableEntity in Lingotek Translation 7.7

Same name and namespace in other branches
  1. 7.2 lib/Drupal/lingotek/LingotekTranslatableEntity.php \LingotekTranslatableEntity
  2. 7.3 lib/Drupal/lingotek/LingotekTranslatableEntity.php \LingotekTranslatableEntity
  3. 7.4 lib/Drupal/lingotek/LingotekTranslatableEntity.php \LingotekTranslatableEntity
  4. 7.5 lib/Drupal/lingotek/LingotekTranslatableEntity.php \LingotekTranslatableEntity
  5. 7.6 lib/Drupal/lingotek/LingotekTranslatableEntity.php \LingotekTranslatableEntity

An interface for entities that are eligible for translation via the Lingotek platform.

Hierarchy

Expanded class hierarchy of LingotekTranslatableEntity

All classes that implement LingotekTranslatableEntity

File

lib/Drupal/lingotek/LingotekTranslatableEntity.php, line 11
Defines LingotekTranslatableEntity.

View source
interface LingotekTranslatableEntity {

  /**
   * Return the Drupal Entity type
   *
   * @return string
   *   The entity type associated with this object
   */
  public function getEntityType();

  /**
   * Return the ID
   *
   * @return int
   *   The ID associated with this object
   */
  public function getId();

  /**
   * Gets the contents of this item formatted as XML that can be sent to Lingotek.
   *
   * @return string
   *   The XML document representing the entity's translatable content.
   */
  public function documentLingotekXML();

  /**
   * Gets a Lingotek metadata value for this item.
   *
   * @param string $key
   *   The key whose value should be returned.
   *
   * @return string
   *   The value for the specified key, if it exists.
   */
  public function getMetadataValue($key);

  /**
   * Sets a Lingotek metadata value for this item.
   *
   * @param string $key
   *   The key for a name/value pair.
   * @param string $value
   *   The value for a name/value pair.
   */
  public function setMetadataValue($key, $value);

  /**
   * Updates the local content of $target_code with data from a Lingotek Document
   *
   * @param string $lingotek_locale
   *   The code for the language that needs to be updated.
   * @return bool
   *   TRUE if the content updates succeeded, FALSE otherwise.
   */
  public function downloadTriggered($lingotek_locale);

  /**
   * Gets the Lingotek document ID for this entity.
   *
   * @return mixed
   *   The integer document ID if the entity is associated with a
   *   Lingotek document. FALSE otherwise.
   */
  public function lingotekDocumentId();
  public function getWorkflowId();
  public function getProjectId();
  public function getVaultId();
  public function getTitle();
  public function getDescription();
  public function getDocumentName();
  public function getUrl($getSource = FALSE);
  public function getNote();
  public function preDownload($lingotek_locale, $completed);
  public function postDownload($lingotek_locale, $completed);
  public function setTitle($title);
  public function setStatus($status);
  public function setTargetsStatus($status, $lingotek_locale = NULL);
  public function setExclusiveTargetsStatus($status_to_set, $statuses_to_exclude);

  /*
   * Returns the source locale for the translatable entity
   */
  public function getSourceLocale();

}

Members

Namesort descending Modifiers Type Description Overrides
LingotekTranslatableEntity::documentLingotekXML public function Gets the contents of this item formatted as XML that can be sent to Lingotek. 2
LingotekTranslatableEntity::downloadTriggered public function Updates the local content of $target_code with data from a Lingotek Document 2
LingotekTranslatableEntity::getDescription public function 2
LingotekTranslatableEntity::getDocumentName public function 2
LingotekTranslatableEntity::getEntityType public function Return the Drupal Entity type 2
LingotekTranslatableEntity::getId public function Return the ID 2
LingotekTranslatableEntity::getMetadataValue public function Gets a Lingotek metadata value for this item. 2
LingotekTranslatableEntity::getNote public function 2
LingotekTranslatableEntity::getProjectId public function 2
LingotekTranslatableEntity::getSourceLocale public function 2
LingotekTranslatableEntity::getTitle public function 2
LingotekTranslatableEntity::getUrl public function 2
LingotekTranslatableEntity::getVaultId public function 2
LingotekTranslatableEntity::getWorkflowId public function 2
LingotekTranslatableEntity::lingotekDocumentId public function Gets the Lingotek document ID for this entity. 2
LingotekTranslatableEntity::postDownload public function 2
LingotekTranslatableEntity::preDownload public function 2
LingotekTranslatableEntity::setExclusiveTargetsStatus public function 2
LingotekTranslatableEntity::setMetadataValue public function Sets a Lingotek metadata value for this item. 2
LingotekTranslatableEntity::setStatus public function 2
LingotekTranslatableEntity::setTargetsStatus public function 2
LingotekTranslatableEntity::setTitle public function 2