TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Backend\Configuration\TranslationConfigurationProvider Class Reference

Public Member Functions

 getSystemLanguages ($pageId=0)
 
 translationInfo ($table, $uid, $languageUid=0, array $row=null, $selFieldList='')
 
 getTranslationTable ($table)
 
 isTranslationInOwnTable ($table)
 
 foreignTranslationTable ($table)
 

Protected Member Functions

 getDatabaseConnection ()
 
 getLanguageService ()
 
 getDefaultLanguageFlag (array $modSharedTSconfig)
 
 getDefaultLanguageLabel (array $modSharedTSconfig)
 

Detailed Description

Contains translation tools

Definition at line 25 of file TranslationConfigurationProvider.php.

Member Function Documentation

◆ foreignTranslationTable()

TYPO3\CMS\Backend\Configuration\TranslationConfigurationProvider::foreignTranslationTable (   $table)

Returns foreign translation table, if any

Parameters
string$tableThe table name
Returns
string Translation foreign table

Definition at line 183 of file TranslationConfigurationProvider.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Backend\Configuration\TranslationConfigurationProvider\getTranslationTable().

◆ getDatabaseConnection()

TYPO3\CMS\Backend\Configuration\TranslationConfigurationProvider::getDatabaseConnection ( )
protected

◆ getDefaultLanguageFlag()

TYPO3\CMS\Backend\Configuration\TranslationConfigurationProvider::getDefaultLanguageFlag ( array  $modSharedTSconfig)
protected
Parameters
array$modSharedTSconfig
Returns
string

Definition at line 202 of file TranslationConfigurationProvider.php.

Referenced by TYPO3\CMS\Backend\Configuration\TranslationConfigurationProvider\getSystemLanguages().

◆ getDefaultLanguageLabel()

TYPO3\CMS\Backend\Configuration\TranslationConfigurationProvider::getDefaultLanguageLabel ( array  $modSharedTSconfig)
protected

◆ getLanguageService()

TYPO3\CMS\Backend\Configuration\TranslationConfigurationProvider::getLanguageService ( )
protected

◆ getSystemLanguages()

TYPO3\CMS\Backend\Configuration\TranslationConfigurationProvider::getSystemLanguages (   $pageId = 0)

Returns array of system languages

The property flagIcon returns a string <flags-xx>. The calling party should call ::getSpriteIcon(<flags-xx>) to get an HTML which will represent the flag of this language.

Parameters
int$pageIdPage id (used to get TSconfig configuration setting flag and label for default language)
Returns
array Array with languages (uid, title, ISOcode, flagIcon)

Definition at line 53 of file TranslationConfigurationProvider.php.

References TYPO3\CMS\Backend\Configuration\TranslationConfigurationProvider\getDatabaseConnection(), TYPO3\CMS\Backend\Configuration\TranslationConfigurationProvider\getDefaultLanguageFlag(), TYPO3\CMS\Backend\Configuration\TranslationConfigurationProvider\getDefaultLanguageLabel(), TYPO3\CMS\Backend\Configuration\TranslationConfigurationProvider\getLanguageService(), TYPO3\CMS\Backend\Utility\BackendUtility\getModTSconfig(), TYPO3\CMS\Backend\Utility\BackendUtility\getRecord(), and TYPO3\CMS\Core\Utility\ExtensionManagementUtility\isLoaded().

◆ getTranslationTable()

TYPO3\CMS\Backend\Configuration\TranslationConfigurationProvider::getTranslationTable (   $table)

◆ isTranslationInOwnTable()

TYPO3\CMS\Backend\Configuration\TranslationConfigurationProvider::isTranslationInOwnTable (   $table)

Returns TRUE, if the input table has localization enabled and done so with records from the same table

Parameters
string$tableThe table name
Returns
bool

Definition at line 172 of file TranslationConfigurationProvider.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Backend\Configuration\TranslationConfigurationProvider\getTranslationTable().

◆ translationInfo()

TYPO3\CMS\Backend\Configuration\TranslationConfigurationProvider::translationInfo (   $table,
  $uid,
  $languageUid = 0,
array  $row = null,
  $selFieldList = '' 
)

Information about translation for an element Will overlay workspace version of record too!

Parameters
string$tableTable name
int$uidRecord uid
int$languageUidLanguage uid. If 0, then all languages are selected.
array$rowThe record to be translated
string$selFieldListSelect fields for the query which fetches the translations of the current record
Returns
mixed Array with information or error message as a string.

Definition at line 104 of file TranslationConfigurationProvider.php.

References $GLOBALS, $uid, TYPO3\CMS\Backend\Utility\BackendUtility\deleteClause(), TYPO3\CMS\Backend\Configuration\TranslationConfigurationProvider\getDatabaseConnection(), TYPO3\CMS\Backend\Utility\BackendUtility\getRecordWSOL(), TYPO3\CMS\Backend\Configuration\TranslationConfigurationProvider\getTranslationTable(), and TYPO3\CMS\Backend\Utility\BackendUtility\versioningPlaceholderClause().