You are here

interface ExtendedTranslatorPluginInterface in TMGMT Extension Suite 8.3

Same name and namespace in other branches
  1. 8 src/ExtendedTranslatorPluginInterface.php \Drupal\tmgmt_extension_suit\ExtendedTranslatorPluginInterface
  2. 8.2 src/ExtendedTranslatorPluginInterface.php \Drupal\tmgmt_extension_suit\ExtendedTranslatorPluginInterface

Interface for service plugin controllers.

Hierarchy

Expanded class hierarchy of ExtendedTranslatorPluginInterface

All classes that implement ExtendedTranslatorPluginInterface

6 files declare their use of ExtendedTranslatorPluginInterface
DownloadTmgmtActionApproveForm.php in src/Form/DownloadTmgmtActionApproveForm.php
JobDownload.php in src/Plugin/QueueWorker/JobDownload.php
JobUpload.php in src/Plugin/QueueWorker/JobUpload.php
TestLocalTranslator.php in modules/tmgmt_extension_suit_test/src/Plugin/tmgmt/Translator/TestLocalTranslator.php
TmgmtExtensionSuitSettingsForm.php in src/Form/TmgmtExtensionSuitSettingsForm.php

... See full list

File

src/ExtendedTranslatorPluginInterface.php, line 12

Namespace

Drupal\tmgmt_extension_suit
View source
interface ExtendedTranslatorPluginInterface extends TranslatorPluginInterface {

  /**
   * Checks whether job is ready for download or not.
   *
   * @param \Drupal\tmgmt\JobInterface $job
   *   Job object.
   *
   * @return bool
   *   TRUE if ready FALSE otherwise.
   */
  public function isReadyForDownload(JobInterface $job);

  /**
   * Downloads translation.
   *
   * Applies translation for all the job items inside the job if $jobitem is
   * NULL. Applies translation to only one job item if $jobItem is passed.
   *
   * @param \Drupal\tmgmt\JobInterface $job
   *   Job object.
   * @param JobItemInterface $jobItem
   *
   * @return bool
   *   TRUE if download process completed successfully
   *   FALSE otherwise.
   */
  public function downloadTranslation(JobInterface $job, JobItemInterface $jobItem = NULL);

  /**
   * Returns file name for a given job.
   *
   * @param \Drupal\tmgmt\JobInterface $job
   *   Job object.
   *
   * @return string
   *   Job file name.
   */
  public function getFileName(JobInterface $job);

  /**
   * Cancels translation.
   *
   * This method cancels not Drupal translation but translation in
   * 3rd party service instead.
   *
   * @param \Drupal\tmgmt\JobInterface $job
   *   Job object.
   *
   * @return bool
   *   TRUE if canceled FALSE otherwise.
   */
  public function cancelTranslation(JobInterface $job);

  /**
   * Requests translation.
   *
   * @param \Drupal\tmgmt\JobInterface $job
   *   TMGMT Job.
   * @param array $data
   *   Data from queue item.
   */
  public function requestTranslationExtended(JobInterface $job, array $data);

}

Members

Namesort descending Modifiers Type Description Overrides
ExtendedTranslatorPluginInterface::cancelTranslation public function Cancels translation. 1
ExtendedTranslatorPluginInterface::downloadTranslation public function Downloads translation. 1
ExtendedTranslatorPluginInterface::getFileName public function Returns file name for a given job. 1
ExtendedTranslatorPluginInterface::isReadyForDownload public function Checks whether job is ready for download or not. 1
ExtendedTranslatorPluginInterface::requestTranslationExtended public function Requests translation. 1
PluginInspectionInterface::getPluginDefinition public function Gets the definition of the plugin implementation. 4
PluginInspectionInterface::getPluginId public function Gets the plugin_id of the plugin instance. 2
TranslatorPluginInterface::abortTranslation public function Aborts a translation job. 1
TranslatorPluginInterface::acceptedDataItem public function Accept a single data item. 1
TranslatorPluginInterface::checkAvailable public function Checks whether a translator is available. 1
TranslatorPluginInterface::checkTranslatable public function Check whether this service can handle a particular translation job. 1
TranslatorPluginInterface::defaultSettings public function Defines default settings. 1
TranslatorPluginInterface::escapeText public function Returns the escaped #text of a data item. 1
TranslatorPluginInterface::getDefaultRemoteLanguagesMappings public function Specifies default mappings for local to remote language codes. 1
TranslatorPluginInterface::getSupportedLanguagePairs public function Returns supported language pairs. 1
TranslatorPluginInterface::getSupportedRemoteLanguages public function Gets all supported languages of the translator. 1
TranslatorPluginInterface::getSupportedTargetLanguages public function Returns all available target languages that are supported by this service when given a source language. 1
TranslatorPluginInterface::hasCheckoutSettings public function Returns if the translator has any settings for the passed job. 1
TranslatorPluginInterface::requestTranslation public function @abstract 3
TranslatorPluginInterface::unescapeText public function Removes escape patterns from an escaped text. 1