You are here

interface LingotekInterface in Lingotek Translation 8

Same name and namespace in other branches
  1. 8.2 src/LingotekInterface.php \Drupal\lingotek\LingotekInterface
  2. 4.0.x src/LingotekInterface.php \Drupal\lingotek\LingotekInterface
  3. 3.0.x src/LingotekInterface.php \Drupal\lingotek\LingotekInterface
  4. 3.1.x src/LingotekInterface.php \Drupal\lingotek\LingotekInterface
  5. 3.2.x src/LingotekInterface.php \Drupal\lingotek\LingotekInterface
  6. 3.3.x src/LingotekInterface.php \Drupal\lingotek\LingotekInterface
  7. 3.4.x src/LingotekInterface.php \Drupal\lingotek\LingotekInterface
  8. 3.5.x src/LingotekInterface.php \Drupal\lingotek\LingotekInterface
  9. 3.6.x src/LingotekInterface.php \Drupal\lingotek\LingotekInterface
  10. 3.7.x src/LingotekInterface.php \Drupal\lingotek\LingotekInterface
  11. 3.8.x src/LingotekInterface.php \Drupal\lingotek\LingotekInterface

Hierarchy

Expanded class hierarchy of LingotekInterface

All classes that implement LingotekInterface

10 files declare their use of LingotekInterface
LingotekAccountDisconnectForm.php in src/Form/LingotekAccountDisconnectForm.php
Contains \Drupal\lingotek\Form\LingotekAccountDisconnect.
LingotekConfigFormBase.php in src/Form/LingotekConfigFormBase.php
Contains \Drupal\lingotek\Form\LingotekConfigFormBase.
LingotekContentTranslationForm.php in src/Form/LingotekContentTranslationForm.php
Contains \Drupal\lingotek\Form\LingotekContentTranslationForm.
LingotekControllerBase.php in src/Controller/LingotekControllerBase.php
Contains \Drupal\lingotek\Controller\LingotekControllerBase.
LingotekDashboardController.php in src/Controller/LingotekDashboardController.php

... See full list

File

src/LingotekInterface.php, line 7

Namespace

Drupal\lingotek
View source
interface LingotekInterface {
  public function get($key);
  public function set($key, $value);
  public static function create(ContainerInterface $container);

  /**
   * Get the available locales on Lingotek.
   *
   * @return array
   *   Array of locales (as in de-DE, es-ES). Empty array if there is an error.
   */
  public function getLocales();
  public function getAccountInfo();
  public function getResources($force = FALSE);
  public function getWorkflows($force = FALSE);
  public function getVaults($force = FALSE);
  public function getCommunities($force = FALSE);
  public function getProjects($force = FALSE);
  public function getDefaults();
  public function getProject($project_id);
  public function setProjectCallBackUrl($project_id, $callback_url);

  /**
   * Uploads a document to the Lingotek service.
   *
   * @param string $title
   *   The title of the document as it will be seen in the TMS.
   * @param $content
   *   The content of the document
   * @param string $locale
   *   The Lingotek locale.
   * @param string $url
   *   The document url in the site if any. This allows support for in-context review.
   * @param \Drupal\lingotek\LingotekProfileInterface $profile
   *   The profile being used.
   *
   * @return mixed
   */
  public function uploadDocument($title, $content, $locale, $url = NULL, LingotekProfileInterface $profile = NULL);

  /**
   * Updates a document in the Lingotek service.
   *
   * @param string $doc_id
   *   The document id to update.
   * @param $content
   *   The content of the document
   * @param string $url
   *   (optional) The document url in the site if any. This allows support for in-context review.
   * @param string $title
   *   (optional) The title of the document as it will be seen in the TMS.
   *
   * @return boolean
   */
  public function updateDocument($doc_id, $content, $url = NULL, $title = NULL);

  /**
   * @param $doc_id
   * @return mixed
   *
   * @deprecated in 8.x-1.4. Use ::getDocumentStatus() instead.
   */
  public function documentImported($doc_id);

  /**
   * Requests a translation to the Lingotek service.
   *
   * @param string $doc_id
   *   The document id to translate.
   * @param string $locale
   *   The Lingotek locale to request.
   * @param \Drupal\lingotek\LingotekProfileInterface $profile
   *   The profile being used.
   *
   * @return mixed
   */
  public function addTarget($doc_id, $locale, LingotekProfileInterface $profile = NULL);
  public function getDocumentStatus($doc_id);

  /**
   * Gets the last edited timestamp from Lingotek service.
   *
   * @param string $doc_id
   *   The document id in Lingotek.
   *
   * @return int
   *   The timestamp.
   */
  public function getUploadedTimestamp($doc_id);
  public function getDocumentTranslationStatus($doc_id, $locale);
  public function getDocumentTranslationStatuses($doc_id);
  public function downloadDocument($doc_id, $locale);

  /**
   * Deletes the document with this document id from the Lingotek service.
   *
   * @param string $doc_id
   *   The document id in Lingotek.
   * @return bool
   *   TRUE if the document was successfully deleted. FALSE if not.
   */
  public function deleteDocument($doc_id);

}

Members

Namesort descending Modifiers Type Description Overrides
LingotekInterface::addTarget public function Requests a translation to the Lingotek service. 2
LingotekInterface::create public static function 2
LingotekInterface::deleteDocument public function Deletes the document with this document id from the Lingotek service. 2
LingotekInterface::documentImported Deprecated public function 2
LingotekInterface::downloadDocument public function 2
LingotekInterface::get public function 2
LingotekInterface::getAccountInfo public function 2
LingotekInterface::getCommunities public function 2
LingotekInterface::getDefaults public function 2
LingotekInterface::getDocumentStatus public function 2
LingotekInterface::getDocumentTranslationStatus public function 2
LingotekInterface::getDocumentTranslationStatuses public function 2
LingotekInterface::getLocales public function Get the available locales on Lingotek. 2
LingotekInterface::getProject public function 2
LingotekInterface::getProjects public function 2
LingotekInterface::getResources public function 2
LingotekInterface::getUploadedTimestamp public function Gets the last edited timestamp from Lingotek service. 2
LingotekInterface::getVaults public function 2
LingotekInterface::getWorkflows public function 2
LingotekInterface::set public function 2
LingotekInterface::setProjectCallBackUrl public function 2
LingotekInterface::updateDocument public function Updates a document in the Lingotek service. 2
LingotekInterface::uploadDocument public function Uploads a document to the Lingotek service. 2