OXID eShop CE  6.1.5
OxidEsales\EshopCommunity\Application\Controller\Admin\LanguageMain Class Reference
+ Inheritance diagram for OxidEsales\EshopCommunity\Application\Controller\Admin\LanguageMain:
+ Collaboration diagram for OxidEsales\EshopCommunity\Application\Controller\Admin\LanguageMain:

Public Member Functions

 render ()
 
 save ()
 

Protected Member Functions

 _getLanguageInfo ($sOxId)
 
 _setLanguages ($aLangData)
 
 _getLanguages ()
 
 _updateAbbervation ($sOldId, $sNewId)
 
 _sortLangArraysByBaseId ()
 
 _assignDefaultLangParams ($aLanguages)
 
 _setDefaultLang ($sOxId)
 
 _getAvailableLangBaseId ()
 
 _checkLangTranslations ($sOxId)
 
 _checkMultilangFieldsExistsInDb ($sOxId)
 
 _addNewMultilangFieldsToDb ()
 
 _checkLangExists ($sAbbr)
 
 _sortLangParamsByBaseIdCallback ($oLang1, $oLang2)
 
 _validateInput ()
 
 checkAbbreviationAllowedCharacters ($abbreviation)
 
 addDisplayException ($message)
 
 isValidLanguageData ($aLanguageData)
 
 getNoJsValidator ()
 

Protected Attributes

 $_aLangData = null
 
 $_aLangParams = null
 
 $_aLanguagesUrls = null
 
 $_aLanguagesSslUrls = null
 

Private Attributes

 $noJsValidator
 

Detailed Description

Admin article main selectlist manager. Performs collection and updatind (on user submit) main item information.

Member Function Documentation

◆ _addNewMultilangFieldsToDb()

OxidEsales\EshopCommunity\Application\Controller\Admin\LanguageMain::_addNewMultilangFieldsToDb ( )
protected

Adding new language to DB - creating new multilangue fields with new language ID (e.g. oxtitle_4)

Returns
null

◆ _assignDefaultLangParams()

OxidEsales\EshopCommunity\Application\Controller\Admin\LanguageMain::_assignDefaultLangParams (   $aLanguages)
protected

Assign default values for eache language

Parameters
array$aLanguageslanguage array
Returns
array

◆ _checkLangExists()

OxidEsales\EshopCommunity\Application\Controller\Admin\LanguageMain::_checkLangExists (   $sAbbr)
protected

Check if language already exists

Parameters
string$sAbbrlanguage abbervation
Returns
bool

◆ _checkLangTranslations()

OxidEsales\EshopCommunity\Application\Controller\Admin\LanguageMain::_checkLangTranslations (   $sOxId)
protected

Check selected language has translation file lang.php If not - displays warning

Parameters
string$sOxIdlanguage abbervation

◆ _checkMultilangFieldsExistsInDb()

OxidEsales\EshopCommunity\Application\Controller\Admin\LanguageMain::_checkMultilangFieldsExistsInDb (   $sOxId)
protected

Check if selected language already has multilanguage fields in DB

Parameters
string$sOxIdlanguage abbervation
Returns
bool

◆ _getAvailableLangBaseId()

OxidEsales\EshopCommunity\Application\Controller\Admin\LanguageMain::_getAvailableLangBaseId ( )
protected

Get availabale language base ID

Returns
int

◆ _getLanguageInfo()

OxidEsales\EshopCommunity\Application\Controller\Admin\LanguageMain::_getLanguageInfo (   $sOxId)
protected

Get selected language info

Parameters
string$sOxIdlanguage abbervation
Returns
array

◆ _getLanguages()

OxidEsales\EshopCommunity\Application\Controller\Admin\LanguageMain::_getLanguages ( )
protected

Loads from config all data related with languages. If no languages parameters array exists, sets default parameters values. Returns collected languages parameters array.

Returns
array

◆ _setDefaultLang()

OxidEsales\EshopCommunity\Application\Controller\Admin\LanguageMain::_setDefaultLang (   $sOxId)
protected

Sets default language base ID to config var 'sDefaultLang'

Parameters
string$sOxIdlanguage abbervation

◆ _setLanguages()

OxidEsales\EshopCommunity\Application\Controller\Admin\LanguageMain::_setLanguages (   $aLangData)
protected

Languages array setter

Parameters
array$aLangDatalanguages parameters array

◆ _sortLangArraysByBaseId()

OxidEsales\EshopCommunity\Application\Controller\Admin\LanguageMain::_sortLangArraysByBaseId ( )
protected

Sort languages, languages parameters, urls, ssl urls arrays according base land ID

◆ _sortLangParamsByBaseIdCallback()

OxidEsales\EshopCommunity\Application\Controller\Admin\LanguageMain::_sortLangParamsByBaseIdCallback (   $oLang1,
  $oLang2 
)
protected

Callback function for sorting languages arraty. Sorts array according 'baseId' parameter

Parameters
object$oLang1language array
object$oLang2language array
Returns
bool

◆ _updateAbbervation()

OxidEsales\EshopCommunity\Application\Controller\Admin\LanguageMain::_updateAbbervation (   $sOldId,
  $sNewId 
)
protected

Replaces languages arrays keys by new value.

Parameters
string$sOldIdold ID
string$sNewIdnew ID

◆ _validateInput()

OxidEsales\EshopCommunity\Application\Controller\Admin\LanguageMain::_validateInput ( )
protected

Check language input errors

Returns
bool

◆ addDisplayException()

OxidEsales\EshopCommunity\Application\Controller\Admin\LanguageMain::addDisplayException (   $message)
protected

Add exception to be displayed in frontend.

Parameters
string$messageLanguage constant

◆ checkAbbreviationAllowedCharacters()

OxidEsales\EshopCommunity\Application\Controller\Admin\LanguageMain::checkAbbreviationAllowedCharacters (   $abbreviation)
protected

Check if language abbreviation contains only allowed characters. Abbreviation is used for view creation, so to be on the safe side with MySQL, only allow characters [0-9,a-z,A-Z_] (basic Latin letters, digits 0-9, underscore). Allowing other characters means table names would have to be escaped with backticks in all queries.

Parameters
string$abbreviationlanguage abbreviation
Exceptions
RegExExceptionif pattern does not match
Returns
bool

◆ getNoJsValidator()

OxidEsales\EshopCommunity\Application\Controller\Admin\LanguageMain::getNoJsValidator ( )
protected
Returns
\OxidEsales\Eshop\Core\NoJsValidator

◆ isValidLanguageData()

OxidEsales\EshopCommunity\Application\Controller\Admin\LanguageMain::isValidLanguageData (   $aLanguageData)
protected

Validates provided language data and sets error to view in case it is not valid.

Parameters
array$aLanguageData
Returns
bool

◆ render()

OxidEsales\EshopCommunity\Application\Controller\Admin\LanguageMain::render ( )

Executes parent method parent::render(), creates oxCategoryList object, passes it's data to Smarty engine and returns name of template file "selectlist_main.tpl".

Returns
string

◆ save()

OxidEsales\EshopCommunity\Application\Controller\Admin\LanguageMain::save ( )

Saves selection list parameters changes.

Returns
mixed

Member Data Documentation

◆ $_aLangData

OxidEsales\EshopCommunity\Application\Controller\Admin\LanguageMain::$_aLangData = null
protected

◆ $_aLangParams

OxidEsales\EshopCommunity\Application\Controller\Admin\LanguageMain::$_aLangParams = null
protected

◆ $_aLanguagesSslUrls

OxidEsales\EshopCommunity\Application\Controller\Admin\LanguageMain::$_aLanguagesSslUrls = null
protected

◆ $_aLanguagesUrls

OxidEsales\EshopCommunity\Application\Controller\Admin\LanguageMain::$_aLanguagesUrls = null
protected

◆ $noJsValidator

OxidEsales\EshopCommunity\Application\Controller\Admin\LanguageMain::$noJsValidator
private

The documentation for this class was generated from the following file: