You are here

interface ExtendedTranslatorPluginInterface in TMGMT Extension Suite 8.2

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

Interface for service plugin controllers.

Hierarchy

Expanded class hierarchy of ExtendedTranslatorPluginInterface

All classes that implement ExtendedTranslatorPluginInterface

5 files declare their use of ExtendedTranslatorPluginInterface
DownloadTmgmtActionApproveForm.php in src/Form/DownloadTmgmtActionApproveForm.php
JobCheckStatus.php in src/Plugin/QueueWorker/JobCheckStatus.php
JobDownload.php in src/Plugin/QueueWorker/JobDownload.php
JobUpload.php in src/Plugin/QueueWorker/JobUpload.php
tmgmt_extension_suit.module in ./tmgmt_extension_suit.module

File

src/ExtendedTranslatorPluginInterface.php, line 11

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.
   *
   * @param \Drupal\tmgmt\JobInterface $job
   *   Job object.
   *
   * @return bool
   *   TRUE if download process completed successfully FALSE otherwise.
   */
  public function downloadTranslation(JobInterface $job);

  /**
   * 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
   * @param array $data
   *
   * @return mixed
   */
  public function requestTranslationExtended(JobInterface $job, array $data);

}

Members

Namesort descending Modifiers Type Description Overrides
ExtendedTranslatorPluginInterface::cancelTranslation public function Cancels translation.
ExtendedTranslatorPluginInterface::downloadTranslation public function Downloads translation.
ExtendedTranslatorPluginInterface::getFileName public function Returns file name for a given job.
ExtendedTranslatorPluginInterface::isReadyForDownload public function Checks whether job is ready for download or not.
ExtendedTranslatorPluginInterface::requestTranslationExtended public function Requests translation.
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