TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Backend\Domain\Repository\Localization\LocalizationRepository Class Reference

Public Member Functions

 fetchOriginLanguage ($pageId, $colPos, $localizedLanguage)
 
 getLocalizedRecordCount ($pageId, $colPos, $languageId)
 
 fetchAvailableLanguages ($pageId, $colPos, $languageId)
 
 getExcludeQueryPart ()
 
 getAllowedLanguagesForBackendUser ()
 
 getRecordsToCopyDatabaseResult ($pageId, $colPos, $destLanguageId, $languageId, $fields=' *')
 
 getRecordLocalization ($table, $uid, $language, $andWhereClause='')
 
 getPreviousLocalizedRecordUid ($table, $uid, $pid, $sourceLanguage, $destinationLanguage)
 

Protected Member Functions

 getBackendUser ()
 
 getDatabaseConnection ()
 

Detailed Description

Repository for record localizations

Definition at line 22 of file LocalizationRepository.php.

Member Function Documentation

◆ fetchAvailableLanguages()

TYPO3\CMS\Backend\Domain\Repository\Localization\LocalizationRepository::fetchAvailableLanguages (   $pageId,
  $colPos,
  $languageId 
)

◆ fetchOriginLanguage()

TYPO3\CMS\Backend\Domain\Repository\Localization\LocalizationRepository::fetchOriginLanguage (   $pageId,
  $colPos,
  $localizedLanguage 
)

Fetch the language from which the records of a colPos in a certain language were initially localized

Parameters
int$pageId
int$colPos
int$localizedLanguage
Returns
array|false|null

Definition at line 32 of file LocalizationRepository.php.

References TYPO3\CMS\Backend\Domain\Repository\Localization\LocalizationRepository\getAllowedLanguagesForBackendUser(), TYPO3\CMS\Backend\Domain\Repository\Localization\LocalizationRepository\getDatabaseConnection(), and TYPO3\CMS\Backend\Domain\Repository\Localization\LocalizationRepository\getExcludeQueryPart().

◆ getAllowedLanguagesForBackendUser()

TYPO3\CMS\Backend\Domain\Repository\Localization\LocalizationRepository::getAllowedLanguagesForBackendUser ( )

◆ getBackendUser()

TYPO3\CMS\Backend\Domain\Repository\Localization\LocalizationRepository::getBackendUser ( )
protected

Returns the current BE user.

Returns

Definition at line 284 of file LocalizationRepository.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Backend\Domain\Repository\Localization\LocalizationRepository\getAllowedLanguagesForBackendUser().

◆ getDatabaseConnection()

◆ getExcludeQueryPart()

◆ getLocalizedRecordCount()

TYPO3\CMS\Backend\Domain\Repository\Localization\LocalizationRepository::getLocalizedRecordCount (   $pageId,
  $colPos,
  $languageId 
)

◆ getPreviousLocalizedRecordUid()

TYPO3\CMS\Backend\Domain\Repository\Localization\LocalizationRepository::getPreviousLocalizedRecordUid (   $table,
  $uid,
  $pid,
  $sourceLanguage,
  $destinationLanguage 
)

Returning uid of previous localized record, if any, for tables with a "sortby" column Used when new localized records are created so that localized records are sorted in the same order as the default language records

: This method is a clone of DataHandler::getPreviousLocalizedRecordUid which is protected there and uses BackendUtility::getRecordLocalization which we also needed to clone in this class. Also, this method takes two language arguments. Note: This function is unused in the core and has been removed with version 9 - Forge ticket #80700

Parameters
string$tableTable name
int$uidUid of default language record
int$pidPid of default language record
int$sourceLanguageLanguage of origin
int$destinationLanguageLanguage of localization
Returns
int uid of record after which the localized record should be inserted

Definition at line 239 of file LocalizationRepository.php.

References $GLOBALS, $uid, TYPO3\CMS\Backend\Utility\BackendUtility\deleteClause(), TYPO3\CMS\Backend\Domain\Repository\Localization\LocalizationRepository\getDatabaseConnection(), TYPO3\CMS\Backend\Utility\BackendUtility\getRecord(), and TYPO3\CMS\Backend\Domain\Repository\Localization\LocalizationRepository\getRecordLocalization().

◆ getRecordLocalization()

TYPO3\CMS\Backend\Domain\Repository\Localization\LocalizationRepository::getRecordLocalization (   $table,
  $uid,
  $language,
  $andWhereClause = '' 
)

Fetches the localization for a given record.

: This method is a clone of BackendUtility::getRecordLocalization, using origUid instead of transOrigPointerField Note: This function is unused in the core and has been removed with version 9 - Forge ticket #80700

Parameters
string$tableTable name present in $GLOBALS['TCA']
int$uidThe uid of the record
int$languageThe uid of the language record in sys_language
string$andWhereClauseOptional additional WHERE clause (default: '')
Returns
mixed Multidimensional array with selected records; if none exist, FALSE is returned

Definition at line 196 of file LocalizationRepository.php.

References $GLOBALS, $uid, TYPO3\CMS\Backend\Utility\BackendUtility\getRecordsByField(), and TYPO3\CMS\Backend\Utility\BackendUtility\isTableLocalizable().

Referenced by TYPO3\CMS\Backend\Domain\Repository\Localization\LocalizationRepository\getPreviousLocalizedRecordUid().

◆ getRecordsToCopyDatabaseResult()

TYPO3\CMS\Backend\Domain\Repository\Localization\LocalizationRepository::getRecordsToCopyDatabaseResult (   $pageId,
  $colPos,
  $destLanguageId,
  $languageId,
  $fields = '*' 
)

Get records for copy process

Parameters
int$pageId
int$colPos
int$destLanguageId
int$languageId
string$fields
Returns
bool||object

Definition at line 148 of file LocalizationRepository.php.

References TYPO3\CMS\Backend\Domain\Repository\Localization\LocalizationRepository\getDatabaseConnection(), and TYPO3\CMS\Backend\Domain\Repository\Localization\LocalizationRepository\getExcludeQueryPart().