Class MultiLanguageDataProvider
Class MultiLanguageDataProvider. Implementation of a multi language Contao
database data provider.
The default language will be initialized to "en".
-
DcGeneral\Data\DefaultDataProvider
implements
DcGeneral\Data\DataProviderInterface
-
DcGeneral\Data\MultiLanguageDataProvider
implements
DcGeneral\Data\MultiLanguageDataProviderInterface
Methods summary
public
|
#
__construct( )
Constructor - initializes the object with English as working language.
Constructor - initializes the object with English as working language.
Overrides
|
public
DcGeneral\Data\LanguageInformationCollectionInterface
|
#
getLanguages( mixed $mixID )
Get all available languages of a certain record.
Get all available languages of a certain record.
Parameters
- $mixID
mixed $mixID The ID of the record to retrieve.
Returns
Implementation of
|
public
DcGeneral\Data\LanguageInformationInterface
|
#
getFallbackLanguage( mixed $mixID )
Get the fallback language of a certain record.
Get the fallback language of a certain record.
Parameters
- $mixID
mixed $mixID The ID of the record to retrieve.
Returns
Implementation of
|
public
DcGeneral\Data\DataProviderInterface
|
#
setCurrentLanguage( string $strLanguage )
Set the current working language for the whole data provider.
Set the current working language for the whole data provider.
Parameters
- $strLanguage
string $strLanguage The new language, use short tag "2 chars like de, fr etc.".
Returns
Implementation of
|
public
string
|
#
getCurrentLanguage( )
Get the current working language.
Get the current working language.
Returns
string Short tag for the current working language like de or fr etc.
Implementation of
|
Methods inherited from DcGeneral\Data\DefaultDataProvider
buildFieldQuery(),
buildFilterQuery(),
buildSortingQuery(),
buildWhereQuery(),
calculateSubfilter(),
createModelFromDatabaseResult(),
delete(),
fetch(),
fetchAll(),
fieldExists(),
getActiveVersion(),
getAndOrFilter(),
getCount(),
getEmptyCollection(),
getEmptyConfig(),
getEmptyModel(),
getFilterForComparingOperator(),
getFilterForInList(),
getFilterForLike(),
getFilterOptions(),
getVersion(),
getVersions(),
insertUndo(),
isUniqueValue(),
resetFallback(),
sameModels(),
save(),
saveEach(),
saveVersion(),
setBaseConfig(),
setVersionActive()
|
Properties summary
protected
string
|
$strCurrentLanguage
|
|
#
Buffer to keep the current active working language.
Buffer to keep the current active working language.
|