Overview

Namespaces

  • DcGeneral
    • Clipboard
    • Contao
      • Callback
      • Compatibility
      • DataDefinition
        • Definition
      • Dca
        • Builder
          • Legacy
        • Definition
        • Palette
        • Populator
      • Event
      • View
        • Contao2BackendView
          • Event
    • Controller
    • Data
    • DataDefinition
      • Builder
      • Definition
        • Properties
        • View
          • Panel
      • ModelRelationship
      • Palette
        • Builder
          • Event
        • Condition
          • Palette
          • Property
    • EnvironmentPopulator
    • Event
    • Exception
    • Factory
      • Event
    • Panel
    • View
      • Event

Classes

  • AbstractModel
  • DCGE
  • DefaultCollection
  • DefaultConfig
  • DefaultDataProvider
  • DefaultLanguageInformation
  • DefaultLanguageInformationCollection
  • DefaultModel
  • MultiLanguageDataProvider
  • NoOpDataProvider
  • PropertyValueBag
  • TableRowsAsRecordsDataProvider

Interfaces

  • CollectionInterface
  • ConfigInterface
  • DataProviderInterface
  • LanguageInformationCollectionInterface
  • LanguageInformationInterface
  • ModelInterface
  • MultiLanguageDataProviderInterface
  • PropertyValueBagInterface
  • VersionModelInterface
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Todo

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
Extended by DcGeneral\Data\MultiLanguageDataProvider implements DcGeneral\Data\MultiLanguageDataProviderInterface
Namespace: DcGeneral\Data
Package: DcGeneral\Data
Located at Data/MultiLanguageDataProvider.php
Methods summary
public
# __construct( )

Constructor - initializes the object with English as working language.

Constructor - initializes the object with English as working language.

Overrides

DcGeneral\Data\DefaultDataProvider::__construct()
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

DcGeneral\Data\LanguageInformationCollectionInterface

Implementation of

DcGeneral\Data\MultiLanguageDataProviderInterface::getLanguages()
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

DcGeneral\Data\LanguageInformationInterface

Implementation of

DcGeneral\Data\MultiLanguageDataProviderInterface::getFallbackLanguage()
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

DcGeneral\Data\DataProviderInterface

Implementation of

DcGeneral\Data\MultiLanguageDataProviderInterface::setCurrentLanguage()
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

DcGeneral\Data\MultiLanguageDataProviderInterface::getCurrentLanguage()
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.

Properties inherited from DcGeneral\Data\DefaultDataProvider
$objDatabase, $strSource
contao-community-alliance/dc-general API documentation generated by ApiGen 2.8.0