TYPO3  7.6
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
TranslationService Class Reference
Inheritance diagram for TranslationService:
SingletonInterface

Public Member Functions

 injectTerService (\TYPO3\CMS\Lang\Service\TerService $terService)
 
 injectSignalSlotDispatcher (\TYPO3\CMS\Extbase\SignalSlot\Dispatcher $signalSlotDispatcher)
 
 injectRepositoryHelper (\TYPO3\CMS\Extensionmanager\Utility\Repository\Helper $helper)
 
 updateTranslation ($extensionKey, $locales)
 

Public Attributes

const TRANSLATION_NOT_AVAILABLE = 0
 
const TRANSLATION_AVAILABLE = 1
 
const TRANSLATION_FAILED = 2
 
const TRANSLATION_OK = 3
 
const TRANSLATION_INVALID = 4
 
const TRANSLATION_UPDATED = 5
 

Protected Member Functions

 updateTranslationForExtension ($extensionKey, $locale)
 
 getMirrorUrl ($extensionKey)
 

Protected Attributes

 $terService
 
 $signalSlotDispatcher
 
 $mirrorUrl = ''
 

Detailed Description

Translation service

Definition at line 20 of file TranslationService.php.

Member Function Documentation

getMirrorUrl (   $extensionKey)
protected

Returns the mirror URL for a given extension.

Parameters
string$extensionKey
Returns
string

Definition at line 126 of file TranslationService.php.

References TranslationService\$mirrorUrl.

Referenced by TranslationService\updateTranslationForExtension().

injectRepositoryHelper ( \TYPO3\CMS\Extensionmanager\Utility\Repository\Helper  $helper)
Parameters
\TYPO3\CMS\Extensionmanager\Utility\Repository\Helper$helperThe helper

Definition at line 66 of file TranslationService.php.

injectSignalSlotDispatcher ( \TYPO3\CMS\Extbase\SignalSlot\Dispatcher  $signalSlotDispatcher)
Parameters
\TYPO3\CMS\Extbase\SignalSlot\Dispatcher$signalSlotDispatcher

Definition at line 58 of file TranslationService.php.

References TranslationService\$signalSlotDispatcher.

injectTerService ( \TYPO3\CMS\Lang\Service\TerService  $terService)
Parameters
\TYPO3\CMS\Lang\Service\TerService$terService

Definition at line 50 of file TranslationService.php.

References TranslationService\$terService.

updateTranslation (   $extensionKey,
  $locales 
)

Update translation for given extension

Parameters
string$extensionKeyThe extension key
mixed$localesComma separated list or array of locales
Returns
array Update information

Definition at line 78 of file TranslationService.php.

References $locales, and TranslationService\updateTranslationForExtension().

updateTranslationForExtension (   $extensionKey,
  $locale 
)
protected

Update the translation for an extension

Parameters
string$extensionKeyThe extension key
string$localeLocale to update
Returns
int Translation state

Definition at line 106 of file TranslationService.php.

References TranslationService\getMirrorUrl().

Referenced by TranslationService\updateTranslation().

Member Data Documentation

$mirrorUrl = ''
protected

Definition at line 45 of file TranslationService.php.

Referenced by TranslationService\getMirrorUrl().

$signalSlotDispatcher
protected
$terService
protected

Definition at line 35 of file TranslationService.php.

Referenced by TranslationService\injectTerService().

const TRANSLATION_AVAILABLE = 1

Definition at line 26 of file TranslationService.php.

const TRANSLATION_FAILED = 2

Definition at line 27 of file TranslationService.php.

const TRANSLATION_INVALID = 4

Definition at line 29 of file TranslationService.php.

const TRANSLATION_NOT_AVAILABLE = 0

Status codes for AJAX response

Definition at line 25 of file TranslationService.php.

const TRANSLATION_OK = 3

Definition at line 28 of file TranslationService.php.

const TRANSLATION_UPDATED = 5

Definition at line 30 of file TranslationService.php.